The best thing you can do if you’re learning to code is to write more code. Below you will find a set of Java practice problems that are available at ClassCube.

All of the problems will load into an online IDE where you can type in your code and test it with a click. We’ve made it as easy to use as possible.

If you’re a teacher, be sure to checkout our page on teaching with ClassCube and find out why ClassCube might just be the perfect tool for you and your students.

#### Arrays

Calculate the sum of all integer values in an array

Create and fill an array of a specified size

Check if the sum of all integers in an array is an even number

Given an array, return the reversed version

#### Basics

Create a Java class totally from scratch

#### Files

Calculate the sum of integers read from a file

#### Lists / ArrayLists

Fix an ArrayList so that it only contains even numbers

Given an ArrayList of Integers, remove all the odd values

#### Logic

Check if two integers add up to 13 or if either is 13

#### Math

Calculate the area of a circle

#### Strings

Return the number of vowels in a given string

Count the number of individual words in a string

Return the first n characters from a string

Given two strings, return the length of the longest shared prefix

Given two strings, return the longest prefix that they share

Given a String str and an int howFar, rotate and return str rotated howFar spaces to the left.