• Post Reply Bookmark Topic Watch Topic
  • New Topic

I am trying to add all the values under Set into a List using addAll(s1) but the boolean is false?  RSS feed

 
Vishal Hegde
Ranch Hand
Posts: 1078
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to add all the values under Set into a list using addAll(s1) but the boolean is coming false ? how to proceed for the same? why is it showing false?

 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishal Hegde wrote:
I am trying to add all the values under Set into a list using addAll(s1) but the boolean is coming false ? how to proceed for the same? why is it showing false?


Hint: Line 36 of your code.

Henry
 
Dave Tolls
Ranch Foreman
Posts: 3064
37
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:
Vishal Hegde wrote:
I am trying to add all the values under Set into a list using addAll(s1) but the boolean is coming false ? how to proceed for the same? why is it showing false?


Hint: Line 36 of your code.

Henry


Don't you mean line 37?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!