print
double x=5;
println
This will print the item and put the cursor in new line.
printf
System.out.printf("Hello, %s. Next year, you'll be %d", name, age);
write
You can see formatting output in java here.
double x=5;
System.out.print(x);
println
This will print the item and put the cursor in new line.
System.out.println(x);
printf
System.out.printf("Hello, %s. Next year, you'll be %d", name, age);
write
System.out.write(x);
It is simpler to use print and println than write. You can see formatting output in java here.
No comments:
Post a Comment