BEST SITE FOR WEB DEVELOPERS
Java programming language. Lessons for beginners

Ua Es De Fr Ru

Java Output Numbers


Print Numbers

You can also use the println() method to print numbers.

However, unlike text, we don't put numbers inside double quotes:

Example

System.out.println(3);
System.out.println(358);
System.out.println(50000);

Try it Yourself »

You can also perform mathematical calculations inside the println() method:

Example

System.out.println(3 + 3);

Try it Yourself »

Example

System.out.println(2 * 5);

Try it Yourself »