Monday, February 4, 2019

Java print with Example and program | Print in Java

print( ) method

 
The print() method prints the required output on the same line continuously again and again on the screen.
 
Example
  1. package test;  
  2. public class Test  
  3. {  
  4.     public static void main(String args[])  
  5.     {  
  6.         System.out.print("first statement. ");  
  7.         System.out.print("second statement. ");  
  8.         System.out.print("third statement");  
  9.     }  
  10. }  
Output
 
print( )

No comments:

Post a Comment

Java String Interview Questions and Answers

1) What is String in Java? Is String is data type? String in Java is not a primitive data type like int, long or double. The string is a ...