Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Binder Early Objects
Quiz 6: Loops
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 61
Multiple Choice
Assume the following variable has been declared and given a value as shown: Random rand = new Random() ; Int number = rand.nextInt (27) * 2 + 3; What are the smallest and largest values number may be assigned?
Question 62
Multiple Choice
How many times is the text "Let's have fun with Java." printed when this code snippet is run? Int i = 0; Do { System.out.println("Let's have fun with Java.") ; I++; If (i % 2 == 0) { I = 10; } } While (i <= 10) ;
Question 63
Multiple Choice
Given the following code snippet, what should we change to have 26 alphabet characters in the string str? String str = ""; For (char c = 'A'; c < 'Z'; c++) { Str = str + c; }
Question 64
Multiple Choice
What is the output of the following loop? Int s = 1; Int n = 1; Do { S = s + n; N++; } While (s < 10 * n) ; System.out.println(s) ;
Question 65
Multiple Choice
Choose the loop that is equivalent to this loop. Int n = 1; Double x = 0; Double s; Do { S = 1.0 / (n * n) ; X = x + s; N++; } While (s > 0.01) ;
Question 66
Multiple Choice
Which of the following loop(s) could possibly not enter the loop body at all? I. for loop II. while loop III. do loop
Question 67
Multiple Choice
Is the following code snippet legal? boolean b = false; Do { System.out.println("Do you think in Java?") ; } While (b !=B) ;
Question 68
Multiple Choice
Which of the loop(s) test the condition after the loop body executes? I. for loop II. while loop III. do loop
Question 69
Multiple Choice
Assume the following variable has been declared and given a value as shown: Random rand = new Random() ; Which of the following will generate a random integer in the range - 20 to 20, inclusive, where each value has an equal chance of being generated?