• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Arrays asList() method

 
Saibabaa Pragada
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Rob Camick
Ranch Hand
Posts: 2600
9
  • 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