Store URL in a database?
<p>What is the best way to store URL that will be used in the application to static?</p>

<p>For example i want to save URL for a feed that are called each time the application is opened.</p>

<p>What would be the best way?</p>

<p>An example would be great!</p>

<p>Here is my Feed.class</p>

<pre><code>public class Feed implements Comparable&lt;Feed&gt; {

static private HashMap&lt;String, Feed&gt; FEEDS=new HashMap&lt;String,Feed&gt;();

static{
    addFeed("Example", "http://www.example.xom/rssfedd/")

}
private String name;
private String url;


public static Feed addFeed(String name, String url){
    Feed result = new Feed(name,url);
    addFeed(result);
    return(result);



}
private static void addFeed(Feed feed){
    FEEDS.put(feed.getKey(), feed);


}
    public static ArrayList&lt;Feed&gt;getFeeds(){
        ArrayList&lt;Feed&gt; result = new ArrayList&lt;Feed&gt;(FEEDS.values());
        Collections.sort(result);

        return(result);
    }

    private Feed getFeed(String key){
        return(FEEDS.get(key));

    }
    private Feed(String name, String url){
        this.name = name;
        this.url = url;

    }
    public String getKey(){
        return(toString());

    }
    public String toString(){
        return(name);
    }
    public String getUrl(){
        return(url);

    }
public int compareTo(Feed another) {

    return (toString().compareTo(another.toString()));
}
}
</code></pre>

<p>=</p>
