Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 1 pts You have the following assignment statement: double myNum = 7.5; Write a line of code that assigns myNum to an int
Question 1 1 pts You have the following assignment statement: double myNum = 7.5; Write a line of code that assigns myNum to an int variable called mylnt. Question 2 1 pts What will the following Java code print? int x = 12; int y = 1; int z = 2; if (x > 7) 11 (z > 5)) System.out.println(y); 0 1 Oy nothing 12 Question 3 1 pts What will the following Java code print? int x = 12; int y = 1; int z = 2; if (x > 7) && (z > 5)) { System.out.println(); } else { System.out.println(x + 2); O 14 O X + 2 nothing 0 1 Question 4 1 pts What will the following Java code print? int x = 12; int y = 1; int z = 2; if (x > 7) && (z > 5)) { System.out.println(y); } else if (x 0) { System.out.println(x); } O 12, 11, 10.9.8 etc. down to O 12 lover & over - infinite loop) nothing O x lover & over-infinite loop) D Question 6 1 pts How many times will the printin statement print out a value? int x = 4; do { System.out.println(x); } while (x >7) ; 1 o 4 O 5 0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started