What is the difference between out.println(a+b); and out.println (a+" " +b); in Java? with a=2 and b=1
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 out.println(a+b); and out.println (a+" " +b); in Java? with a=2 and b=1Core Java
Ans. First will give the ouput as 3 and the second will give output as 2 1

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

   Like         Discuss         Correct / Improve     java   system.out.println   coding


Related Questions

  Will the static block be executed in the following code ? Why ?
 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 ?
  What is the difference between System.console.write and System.out.println ?
  Will static block for Test Class execute in the following code ?
  What will the following code print ?
  Can a class implement two Interfaces having default method with same name and signature ?
  What If we make the method as abstract in another Interface ?



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: