This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Arrays asList() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Arrays asList() method" Watch "Arrays asList() method" New topic
Author

Arrays asList() method

Saibabaa Pragada
Ranch Hand

Joined: Oct 24, 2010
Posts: 162
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2372
    
    8
Not exactly sure what is going on but Lists are only for Objects. Not sure what happens when you try to use a primitive array.

Try the following and it works as you expect:



Edit: it looks like it just returns the original array:

Subhasis Gorai
Greenhorn

Joined: Dec 13, 2010
Posts: 3
Please check this topic, hope it helps ..
http://www.coderanch.com/t/510492/java-programmer-SCJP/certification/Arrays-asList
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Arrays asList() method
 
It's not a secret anymore!