Generics, in your case, will also show you some bugs in your code. You are relying on implicit casting to turn a String into an int.
My advice is to stop and think about what you are putting INTO...
Type: Posts; User: jdv
Generics, in your case, will also show you some bugs in your code. You are relying on implicit casting to turn a String into an int.
My advice is to stop and think about what you are putting INTO...
What does ArrayList.get(int) return? Where are you storing the result? Do these types match?
Hint: this is where you should be paying attention to the warnings your IDE is showing about your use...
This example does not compile because of multiple syntax errors.
To answer your question, I'll ask my own: for the method signature
public static void getDetails(details) what Java type is...