Computer Science Review Chapter# 2, (1&2) sett

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

The assignment operator in Java is _____.

=

Which assignment is correct in Java?

All of the above are correct

Which of the following elements is not required in a variable declarations?

An assigned value

An escape sequence always begins with a(n) ____________.

Backslash

Which of the following data types can store a value in the least amount of memory?

Byte

When the data cannot be changed after a class is compiled, the data is______.

Constant

In Java, what is the value of 3+7*4+2?

33 Multiply then add

The "equal to" relational operator is ________.

==

If you attempt to add a float, an int, and a byte , the results will be a(n) ___________.

Float

When you perform arithmetic w/ values of diverse types, Java __________.

Implicitly converts the values to a unifying type

The remainder operator ________.

Module = Is non of the above

Which of the following is not a primitive data type in Java?

Sector

According to the rules of operator precedence, when division occurs in the same arithmetic statement as _________, the division operation always takes place first.

Subtraction

Which Java statement produces the following output? W Xyz

System,out.println("w\nxyz");

A Boolean variable can hold _______.

The value true or false

The value 137.68 can held by a variable of type _________.

Two of the proceeding answers are correct

You use _________ to explicitly override an implicit type.

Type cast

Which assignment is correct in Java? (2nd different question)

a) Char a Char= 5.5; b) Char a Char= "W"; c) Char a Char = '*'; (answer) d) Two of the proceeding answers are correct

Which assignment is correct in Java? (different question)

a) Double money= 12; b) Double money= 12.0; c) Double money= 12.0d; d) All of above are correct (answer)

Assuming you have declared shoeSize to be a variable of type int, which of the following is a valid assignment statement in Java?

shoeSize = 9;


Ensembles d'études connexes

CCNA 2 v7 Modules 10 - 13: L2 Security and WLANs Exam

View Set

Quiz: Licensee Responsibilities in Selling Life Insurance

View Set

Ch 29: Musculoskeletal or Articular Dysfunction

View Set

Anatomy and Physiology Lecture Exam 21, 22, 23

View Set

Stats: Chapter 6- What's Normal?

View Set