Please enable JavaScript to use CodeHS

Java in CodeHS

Everything you can do in CodeHS Java programs!

By Andy Bayer

Software Developer at CodeHS

The CodeHS IDE supports fully-featured Java, for everyone from a beginner to a long-time industry programmer looking to create labs.

Interacting via the Console

The console is the main way you interact with a Java program. System.out.println prints values to the console, and the Scanner class lets you read values from the user into your program.

Multi-File Programs

Splitting a program into multiple files is an important way to separate mutliple class definitions. All Java files you write will be available in the class path with no extra steps required.

.jar Files

In addition to multiple .java files, you can upload .jar files to be included in the class path.

JUnit

By including the required .jar files, we can use JUnit to run tests.

Graphical Programs

Using the popular Swing library, you can load images into your programs for image processing and editing.