What is the difference between print() and println() in Java ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. What is the difference between print() and println() in Java ?
Ans. print method prints the argument passed to the method whereas println prints the argument and then prints the new line character. println is generally used if we want each output in a new line.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     print   println


Related Questions

  Will the static block be executed in the following code ? Why ?
 Write a Program to print pattern like following

*
**
***
****
*****
*****
****
***
**
*
 What will happen if we call perform(null) ?

public void perform(Object obj) {
System.out.println("Object");
}

public void perform(Integer int) {
System.out.println("Integer");
}
 What will be the output of following code ?

System.out.println((int)'a');
 What will be the output of

System.out.println((Integer)'a');
 Explain System.out.println ?
 Write a Program to print factorial of a number using recursion
 Write a program to print next largest palindrome number?
  What is the difference between System.console.write and System.out.println ?
  Will static block for Test Class execute in the following code ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: