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
Share

Search Interview Questions


 3358 questions in repository.
 There are more than 200 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

   



Java - 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
Admin
info@buggybread.com
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

 Explain System.out.println ?
  What is the difference between System.console.write and System.out.println ?
  Will the static block be executed in the following code ? Why ?
  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 ?
  What if we override the conflicting method in the Class ?
  What will the following code do ?
 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");
}




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

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:
         

X Close this