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

Jshell and REPL required to use?

Craig,

I am following along quite nicely and not having really any issues, however, I had one small question or two.

Is it a requirement to learn Jshell and REPL to learn Java itself? From what I am gathering is that they are both just useful tools to use in cahoots with writing Java. Can you tell me the purpose of spending the time we are on being instructed to use Jshell and REPL, instead of on purely Java stuff?

Also, if someone is planning on using IDEs and such in the future once that person is all proficient in the language and the chosen IDE environment, will Jshell and REPL really have a big impact on what that person is doing later on?

I know some people will use them both, and some won't. I came to learn Java and sometimes I get the feeling that the time I have spent so far in REPL and Jshell has either taken away from time from learning the language itself, or has contributed a bit to a small amount of confusion that I have had to figure my way out of.

Not at all trying to bash either of them if ya'll are for some reason trying to promote them. Just curious what is the practical use of them, and what is the likelihood highly experienced java programmers use these day in/day out when they have the IDEs and such.

Thanks.

1 Answer

No, certainly not a requirement to learn JShell. It's a new feature in Java 9. It may help the learning process because it allows you to run code snippets without building a program, compiling, and executing.

I can tell you from firsthand experience that I learned Java using an IDE (Eclipse) and just recently found out about JShell.