There are several ways to print an output in java. We can use any of the following methods to print the output.
System : It is a class in java.lang, the default package.
out : It is a reference of java.io.PrintStream object and it is also a static member of System class.
println : Prints in a new line.
print : Prints the output.
printf : It works as printf in C/C++.
System : It is a class in java.lang, the default package.
out : It is a reference of java.io.PrintStream object and it is also a static member of System class.
println : Prints in a new line.
print : Prints the output.
printf : It works as printf in C/C++.
No comments:
Post a Comment