Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java The Thing About Strings

osvaldo carrillo
osvaldo carrillo
5,072 Points

I don't have any idea how "explore" works

public static void main(String[] args) { // Your assumptions here int firstNumber = 12; int secondNumber = 12; explore("Primitives use double equals", firstNumber == secondNumber); Object firstObject = new Object(); Object secondObject = new Object(); explore("Objects references use double equals to check if they refer to the same object in memory, seemingly equal objects are not equal",

1 Answer

explore() is a method created for the purpose of this tutorial to print out the results of each test. You can catch a glimpse of its implementation at around the 0:50 mark