Question: Java Test 36) What is the number of iterations in the following loop: for (int i = 1; i < = n; i++) { //

Java Test

36) What is the number of iterations in the following loop: for (int i = 1; i < = n; i++) { // iteration }

36) A) n B) n + 1 C) n - 1 D) 2*n

37) What is Math.rint(3.6)?

37) A) 4.0 B) 3.0 C) 5.0 D) 3 7

38) What code may be filled in the blank without causing syntax or runtime errors: public class Test { java.util.Date date; public static void main(String[ ] args) { Test test = new Test(); System.out.println(________); } }

38) A) test.date B) date.toString() C) test.date.toString() D) date

39) Suppose x=10 and y=10 what is x after evaluating the expression (y >= 10) || (x- - > 10)?

39) A) 11 B) 9 C) 10

40) What is the value in count after the following loop is executed? int count = 0; do { System.out.println("Welcome to Java"); } while (count++ < 9); System.out.println(count); 40) A) 8 B) 0 C) 9 D) 10 E) 11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!