Question: In some programming API's I see a list of methods to call, like getBoolean(String key, getDouble(String key), and getString(String key). Some other API's use a general get(String key) method, and return an Object which you are supposed to cast to an appropriate type yourself.

Now I am writing my own data accessing point, and I am wondering which approach to use. What are the advantages and disadvantages of each approach? When would you choose one over the other?

Answer: 
Advantage: getBoolean(), getDouble(), etc. allow you to return the respective primitive types. As far as I've seen, that's the primary reason anyone writes methods like that.
It depends on the purpose of the library. When the output is a predictable set of items, then toy can have specific names. As in [ResultSet](http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html).
If it is generic, then you will need generic get methods. Like [ObjectOutputStream](http://download.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html)

In a very high level sense, you might need both: `getBoolean`, `getDouble`, `getIngeter` for the primitives (or their respective wrappers), a `getString`, for `Strings` and a generic `get` or a `getObject` for getting out objects.

However, this is a very generic answer for a very generic questions. What your tries to do very much decided such stuff.