Explain the problem with this fragment of code: Int a, b; a = b; b = 1;

      

Explain the problem with this fragment of code:
Int a, b;
a = b;
b = 1;

  

Answers


Davis
-At line 2, b is uninitialized.A compilation error will result because we are trying to store an initialized variable in a.
Githiari answered the question on January 26, 2018 at 12:24


Next: Which of the following variables are allowed in Java, and which have the correct style?Volume, Area, Length, 3 sides, Sidel, length, Mysalary, Your salary, Screensize
Previous: In the following, what are the values of the variables after each statement when coding a java program? Int a, b, c, d; d = -8; a =...

View More Computer Studies Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions