Question: 11. What does the following statement sequence print? final String str = Java; str += is powerful; System.out.println(str); Select one: a. Java is powerful

11.

What does the following statement sequence print?

final String str = "Java";

str += " is powerful";

System.out.println(str);

Select one:

a. Java is powerful

b. Java + is powerful

c. is powerful

d. Nothing; compile-time error

12.

During program development, errors are

Select one:

a. very rare

b. prevented by the compiler

c. automatically tracked by the Integrated Development Environment (IDE)

d. unavoidable

13.

Java 7 introduced enhanced syntax for declaring array lists, which is termed

Select one:

a. angle brackets.

b. method lists.

c. diamond syntax.

d. symmetric slants.

14.

Consider the following code snippet. What is the potential problem with the if

statement?

double average;

average = (g1 + g2 + g3 + g4) / 4.0;

if (average == 90.0)

{

System.out.println("You earned an A in the class!");

}

Select one:

a. Using == to test the double variable average for equality is error-prone.

b. The conditional will not evaluate to a Boolean value.

c. The assignment operator should not be used within an if-statement

conditional.

d. Literals should never be used in if statement conditionals.

15.

Computer scientists have devised something that allows programmers to describe

tasks in words that are closer to the syntax of the problems being solved. This is

called a(n)

Select one:

a. Embedded system

b. Machine instruction

c. High-level programming language

d. Compiler

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!