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 Objects Meet Objects Refresher

Rabab El-Zohbi
Rabab El-Zohbi
1,859 Points

What operator do we use to ensure that both of these conditions are met:

What operator do we use to ensure that both of these conditions are met:

Have you solve out? I tried to answer == but it return error which is wired. I tried also !=, it didnt went well either

2 Answers

Allan R
Allan R
1,001 Points

The operator that you need to use is " &&". Because its ensure that both those conditions are met, otherwise, it will return in / false.

This is testing your knowledge of conditional/logical operators.

This video in the Java basics course briefly talks about them.

I think a better video to watch is this one from the JavaScript course. Don't worry, he only explains the operators.