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

Naomi Mitchell
PLUS
Naomi Mitchell
Courses Plus Student 782 Points

What is the difference between jshell and the console please?

You go on to the console to run your code to see if there are errors but you can access jshell on the console which seems to me that it does the same thing? Can anyone tell me what the difference is please? How and when should i use them both?

Thanks,

1 Answer

  • In console you would run your big programs, like if you had a grocery list program, you would run the program from the console.
  • JShell is like a testing environment. If you want to just test and play around with ints, floats, strs, etc.. you would use the jshell.