What will we get if we try to print local variable that hasn't been initialized ?
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 will we get if we try to print local variable that hasn't been initialized ?Core Java
Ans. It will print the garbage value as compiler doesn't provide a default value to local variables.

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

   Like         Discuss         Correct / Improve     local variable  default values      basic


Related Questions

  What are the default or implicitly assigned values for data types in java ?
  Why do member variables have default values whereas local variables don't have any default value ?
  Variable of the boolean type is automatically initialized as?
 What is the default value of a declared object reference ?



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: