static ArrayAdapter<CharSequence> createFromResource(Context context, int textArrayResId, int textViewResId)
Can someone explain the syntax of ArrayAdapter<CharSequence>?
Thanks
That's generics. It's a way of saying that one type's API can be parameterized by one or more other types. It's saying that the return type is ArrayAdapter<T> where T is CharSequence in this particular case.
For a lot more information, see Angelika Langer's Java Generics FAQ. You might want to start with "What are Java generics?"
That would be a use of generics.
In simple, readable terms it says that you are going to receive an ArrayAdapter of CharSequences from the call.
In not so simple terms, it means that you're constraining one or more members of the ArrayAdapter type to be of type CharSequence.
ArrayAdapter is a type declaration for the return value of that method. The bit with the angle brackets is a type declaration for Java generics. Read more about Java generics here:
http://download.oracle.com/javase/tutorial/java/generics/index.html
ArrayAdapter isn't a class declaration... it's the return type of the createFromResource method...