Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection

 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

d
b
c
a
--------------
d
b
c
a

why doesn't reflect on stringSet ?
 
Winston Gutkowski
Bartender
Pie
Posts: 10490
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
meeta gaur wrote:why doesn't reflect on stringSet ?

Why would you think it does? Nothing in the documentation says the result of toArray() is connected with the collection it was called on.

Winston
 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:
meeta gaur wrote:why doesn't reflect on stringSet ?

Why would you think it does? Nothing in the documentation says the result of toArray() is connected with the collection it was called on.

Winston


Because it happens in case of Arrays.asList().That's why i thought same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic