Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Arrays asList() method  RSS feed

 
Saibabaa Pragada
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Rob Camick
Ranch Hand
Posts: 2752
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check this topic, hope it helps ..
http://www.coderanch.com/t/510492/java-programmer-SCJP/certification/Arrays-asList
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!