November 22nd, 2011 03:01 PM
#1
SimpleList Question
Im having trouble figuring out list, I have a question regarding the following to lines
private SimpleList<String> merge (SimpleList<String> x, SimpleList<String> y)
private SimpleList<Integer> searchLine(String line, String s)
I just was wondering what is the difference when it says (SimpleList <String>) & then When it just says (String). When SimpleList is not there what can I now do or not do?
2nd Question the after Private SimpleList what is the word in the <> referencing regarding my code?
November 22nd, 2011 03:28 PM
#2
Re: SimpleList Question
I just was wondering what is the difference when it says (SimpleList <String>) & then When it just says (String).
They are different classes.
SimpleList <String> = Assuming SimpleList implements the List interface, this is a List class whose contents are Strings.
String = The String class.
what is the word in the <> referencing
This is generics. Read this tutorial
Tags for this Thread
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks