Question: What will be the output of the following code? class DoSomething ( public static void main(String args[]) int myVal = 10; if (myVal ==
What will be the output of the following code? class DoSomething ( public static void main(String args[]) int myVal = 10; if (myVal == 10) l } Int myVal = 20; System.out.println(myVal);
Step by Step Solution
There are 3 Steps involved in it
it appears to be defining a class called DoSomething with a main method Inside the main method there is a variable called myVal that is initialized to 10 There is also an if statement that checks if m... View full answer
Get step-by-step solutions from verified subject matter experts
