Results 1 to 4 of 4
- 12-31-2009, 02:05 PM #1
Member
- Join Date
- Dec 2009
- Posts
- 41
- Rep Power
- 0
- 12-31-2009, 04:10 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,376
- Blog Entries
- 7
- Rep Power
- 17
- 12-31-2009, 04:48 PM #3
Member
- Join Date
- Dec 2009
- Posts
- 41
- Rep Power
- 0
JosAH, Thanks..One question, is it needed addition <String> set after every method?
myList.size<String>() or myList.size()...
- 12-31-2009, 04:55 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,376
- Blog Entries
- 7
- Rep Power
- 17
No there is no need to do that; after you have declared the type of the list (List<String>) and created one the compiler knows that its elements shall all have type String and flags every attempt to do otherwise as an exception. So, basically you can use the 'raw' methods whereever you want.
kind regards,
Jos
Similar Threads
-
Need help using the Linked List class
By wlc in forum New To JavaReplies: 1Last Post: 08-13-2009, 03:38 AM -
Creating a Defined Class with Member Functions
By New2Java in forum New To JavaReplies: 6Last Post: 08-05-2009, 09:05 PM -
have "regular" functions - with no class
By itaipee in forum New To JavaReplies: 2Last Post: 01-29-2009, 03:12 PM -
How do I store multiple Strings with an inherited class?
By trojansc82 in forum New To JavaReplies: 0Last Post: 11-15-2008, 10:09 PM -
Accessing list out another class
By Preethi in forum New To JavaReplies: 23Last Post: 10-26-2008, 02:54 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks