Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 31 Math.ceil(5.5) evaluates to ________. A. 6 B. 6.0 C. 5.0 D. 5 Question 32 Which of the following is the correct expression of

Question 31 Math.ceil(5.5) evaluates to ________. A. 6 B. 6.0 C. 5.0 D. 5

Question 32 Which of the following is the correct expression of character 4? A. 4 B. '\0004' C. '4' D. "4"

Question 33 Suppose i is an int type variable. Which of the following statements display the character whose Unicode is stored in variable i? A. System.out.println((int)i); B. System.out.println(i); C. System.out.println(i + " "); D. System.out.println((char)i);

Question 34 What is y after the following statements are executed? x = 0; y = (x > 0) ? 10 : -10; A. -10 B. 0 C. 10 D. Illegal expression

Question 35 The following loop displays ________. for (int i = 1; i <= 10; i++) { System.out.print(i + " "); i++ } A. 1 2 3 4 5 B. 1 2 3 4 5 6 7 8 9 10 C. 1 2 3 4 5 6 7 8 9 D. 1 3 5 7 9

Question 36 The expression (int)(76.0252175 * 100) / 100 evaluates to ________. A. Result is 76.03 B. Result is 76 C. Result is 76.02 D. Result is 76.0252175

Question 37 Suppose income is 4001, what is the output of the following code? if (income > 3000) { System.out.println("Income is greater than 3000"); } else if (income > 4000) System.out.println("Income is greater than 4000"); A. Income is greater than 3000 B. Income is greater than 3000 followed by Income is greater than 4000 C. Income is greater than 4000 D. no output

Question 38 The equal comparison operator in Java is ________. A. <> B. = C. != D. ==

Question 39 ________ is the Java assignment operator. A. = B. =: C. == D. :=

Question 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); A. 9 B. 10 C. 11 D. 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

What is the difference between a 3PL and a 4PL/LLP?

Answered: 1 week ago