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

Adam Sawicki
Adam Sawicki
15,967 Points

Java-REPL

Could you give me an idea, what I can use java-repl for? Thanks ;p

5 Answers

Pavils Nikitins
Pavils Nikitins
410 Points

I've just watched the "Welcome Back" video, and I'm a bit confused as well. From what I understood, I guess you can use it to "test out" things before actually writing down any code in your actual project?

So for example, you have an idea for some logic you could implement, but instead of writing it down in the actual code, you could test it out in REPL?

I could be wrong, but that's what I understood from the "Welcome Back" video in Java Objects. Could anyone confirm/deny?

Pavils, you're basically right. If you've ever used the Python interpreter, then this is basically the same concept. If you want to quickly test some rough ideas without having to waste time in creating a whole .java file, compiling it, troubleshooting possible errors, and then having to edit and re-compile., then the java-repl is for you.

Scott Adams : However, isn't that what the Workspaces before the REPL was also capable of doing? I'm still not sure what value the REPL adds to the Workspaces we used from the Java Basics course.

I would say that if your using Workspaces as an IDE for your personal projects, rather than locally, then the value here is that if you want to test out something in Java, the REPL is available for you.

Darryl Soerdjpal
Darryl Soerdjpal
740 Points

From what I have gathered, you will mostly use an IDE when you start your own projects. IDE's are explained in another course within the Java track.

So in short: you might not find REPL as useful in a fully featured IDE like Intellij IDEA, but it is useful in the workspace environment that is provided here.

Well, you have access to a terminal in an IDE, and the java-repl is accessed within the terminal, therefore it is useful if you want to test out a rough idea of yours...

Darryl Soerdjpal
Darryl Soerdjpal
740 Points

That is absolutely true. I just find it less useful personally. Hopefully that clears things up! :)