Question: Question 1 What will be printed by the statements below? int x = 20; int y = x; x += 3; y = 2; System.out.print(x



Question 1 What will be printed by the statements below? int x = 20; int y = x; x += 3; y = 2; System.out.print("x x = 23, y = 46 0 x = 23, y = 40 0 * = 46, y = 46 0 x = 5, y = 2 " + x + ", y = " + y); Question 2 What is the Java Virtual Machine? O A CPU that runs compiled Java code. O A library that makes it possible to write portable programs. A program that simulates a real CPU running compiled Java code. A program that translates Java code into machine instructions. Question 3 The type of an object is given by its ? variable method reference class response. Question 4 Assuming that a user enters 56 for age, what is the output of the following code snippet? int age=; Scanner in new Scanner(System.in); System.out.print("Please enter your age: "); age in.nextInt(); if (age (13) System.out.println("Kid!"); if (age >= 13 && age = 19 && age 30 && age = 50) System.out.println("old!"); Teeni Young Adult! Old
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
