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 (Retired) Meet Objects Welcome Back

Why are we putting code below in the Java console area as previously we put Java code up top in the text editor?

Why are we putting code below in the Java console area as previously we put Java code up top in the text editor? I am very confused about this.

Hi Mark,

The Java Console area tests the code in the text editor. So I think Mr. Craig was doing it in the console so that he could quickly get different answers without switching between editor and console and also so that he didn't have to change the main code in the editor.

I hope this helps.

1 Answer

Joshua DeJong
Joshua DeJong
3,138 Points

Peter is right. If you've ever used another language with an interactive interpreter, like Python, then you'll know that that is basically what REPL does for us. REPL allows you to execute your code instantly without having to compile first.