Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Data Structures - Retired Exploring the Java Collection Framework Sets

what is this ??? i'm not able to understand please help me out...

what does it meas Craig Dennis you said it is a little trick i'm not able to understand it please help me ......

whats does Character.MAX_VALUE will return and whats does subSet method do please help me

uniqueLanguages.subSet("Java", "Java" + Character.MAX_VALUE);

1 Answer

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

A subset is a section of the collection that finds everything that starts with the first parameter and up until the second one. So here we are using Character.MAX_VALUE anything between A to Z (more or less there are more characters up in there, like smiley faces and icons).

That make sense?

Andre Kucharzyk
Andre Kucharzyk
4,479 Points

Sorry @Craig Dennis but I dont get it...

So what is the second parameter? Since the Character.MAX_VALUE = '?' then our second parameter is "Java?" ?