Welcome to Java!

Welcome to the world of Java! In this challenge, we practice printing to stdout. The code stubs in your editor declare a Solution class and a main method. Complete the main method by copying the tw

View Solution →

Java Stdin and Stdout I

Most HackerRank challenges require you to read input from stdin (standard input) and write output to stdout (standard output). One popular way to read input from stdin is by using the Scanner class

View Solution →

Java If-Else

In this challenge, we test your knowledge of using if-else conditional statements to automate decision-making processes. An if-else statement has the following logical flow: Wikipedia if-else flow

View Solution →

Java Stdin and Stdout II

In this challenge, you must read an integer, a double, and a String from stdin, then print the values according to the instructions in the Output Format section below. To make the problem a little eas

View Solution →

Java Output Formatting

Java's System.out.printf function can be used to print formatted output. The purpose of this exercise is to test your understanding of formatting output using printf. To get you started, a portion

View Solution →

Java Loops I

Objective In this challenge, we're going to use loops to help us do some simple math. Task Given an integer, N, print its first 10 multiples. Each multiple N x i (where 1 <= i <=10 ) should be

View Solution →

Java Datatypes

Java has 8 primitive data types; char, boolean, byte, short, int, long, float, and double. For this exercise, we'll work with the primitives used to hold integer values (byte, short, int, and long):

View Solution →