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:
ExampleGet your own Java Server
System.out.println(3);
System.out.println(358);
System.out.println(50000);
You can also perform mathematical calculations inside the println()
method:
Exercise?What is this?
Test your skills by answering a few questions about the topics of this page
What is the output of the following code?System.out.println(3 + 3);