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 Basics Perfecting the Prototype Censoring Words - Using String Equality

Bhanu Awasthi
Bhanu Awasthi
1,780 Points

What does Craig meant by Boolean ?

Craig while writing the code and searching for - equals method in Oracle Java doc, mentioned a word "Boolean" in it.

I get the idea that Boolean is something which returns in True or False way but is it only equals or equalsIgnoreCase method which comes under Boolean class.

Please help me to get a clean idea about "What exactly is Boolean" ?

Thank You.

2 Answers

Kevin Faust
Kevin Faust
15,353 Points

Hey Bhanu,

Looks like you understand the main idea behind boolean. There are many different methods that bring back boolean values. An example that you got exposed to was both those equal methods. It checks if two things are the same and returns true and false. There are way too many examples to type but if you understand that boolean is true/false and you understand how the methods craig introduced return boolean values, then you are fine.

Kevin

Bhanu Awasthi
Bhanu Awasthi
1,780 Points

Thanks for the further clarity Kevin.

Best Regards