Chapter 1 and 2 CS2265

Ace your homework & exams now with Quizwiz!

the value true or false

A boolean variable can hold what?

subtraction

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

main( )

All Java applications must have a method named what?

semicolon

All Java programming statements must end with what?

backslash

An escape sequence always begins with a(n) what?

object

An instance of a class is a(n) what?

parentheses

Arguments to methods always appear within what?

shoeSize = 9;

Assuming you have declared shoeSize to be a variable of type int, which of the following is a valid assignment statement in Java? a. shoeSize = 9; b. shoeSize = 9.5; c. shoeSize = "nine"; d. Two of the above are valid.

Object-oriented programming

Envisioning program components as object that are similar to concrete objects in the read world is the hallmark of what?

float

If you attempt to add a float, an int, and a byte, the result will be a(n) what?

33

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

dots

In a Java program, you must use what to separate classes, objects, and methods.

neutral

Java is architecturally what?

line, block, and javadoc

Java supports three types of comments, what are they?

High-level programming language

Languages that let you use an easily understood vocabulary of descriptive terms such as read, write, or add are know as what languages.

variables

Named computer memory locations are called what?

java

The command to execute a compiled Java application is what?

==

The equal to relation operator is what?

procedures

The individual operations used in a computer program are often grouped into logical units called what?

Machine language or machine code

The most basic circuitry-level computer language is

is none of the above

The remainder operator _________? a. is represented by a forward slash b. must follow a division operation c. provides the quotient of integer division d. is none of the above.

syntax

The rules of a programming language constitute its what?

float and double

The value 137.68 can be held by a variable of what type?

state

The values of an object's attributes are know as its what?

compiler or interpreter

Translates high-level language statements into machine code.

constant

When data cannot be changed after a class is compiled, the data is what?

implicitly converts the values to the type of the first operand

When you perform arithmetic with values of diverse types, Java does what?

char aChar = '*';

Which assignment is correct in Java? a. char aChar =5.5; b. char aChar = "W"; c. char aChar = '*'; d. Two of these are correct.

double money = 12.0;

Which assignment is correct in Java? a. double money = 12; b. double money = 12.0; c. double money = 12.0d; d. All of the above are correct.

double value = 2.12;

Which assignment is correct in Java? a. int value = (float) 4.5; b. float value = 4 (double); c. double value = 2.12; d. char value = 5c;

byte

Which of the following data types can store the value 0 using the least amount of memory? a. short b. long. c. int d. byte

an assigned value

Which of the following elements is not required in a variable declaration? a. a type b. an identifier c. an assigned value d. a semicolon

sector

Which of the following is not a primitive data type in Java.? a. boolean b. byte c. sector d. int

debugging

Which of the following is not necessary to do before you can run a Java program? a. coding b. compiling c. debugging d. saving

.java

You save text files containing Java source code using what file extension?

type cast

You use a ______________ to explicitly override an implicit type.

comments

non-executing program statements that provide documentation are called what?

=

the assignment operator in Java is what?

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

what Java statement produces w on one line and xyz on the next line? w xyz

bytecode

you must compile classes written in Java into what?


Related study sets

Fundamentals - Hygiene and Wound Care (Ch. 32 and 33)

View Set

6.4 Enzymes speed up metabolic reactions by lowering energy barriers

View Set

EMT: Emergency Care Chapter 3 Post Test

View Set