Download Quiz 2 - UNM Computer Science

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
CS 152
Computer Programming
Fundamentals
Quiz 2
Brooke Chenoweth
University of New Mexico
Spring 2017
Question 1: Bytecode
What is Java Bytecode?
A Machine code for a Java Virtual Machine.
B Machine code for the particular machine on
which the Java source code was compiled.
C The binary code Java uses to store bytes.
D The hexadecimal code Java uses to store bytes.
E A device that bites, chews and spits Java code.
Question 1: Bytecode
What is Java Bytecode?
A Machine code for a Java Virtual Machine.
B Machine code for the particular machine on
which the Java source code was compiled.
C The binary code Java uses to store bytes.
D The hexadecimal code Java uses to store bytes.
E A device that bites, chews and spits Java code.
Question 2: Primitive Types
In Java, the keywords byte, short, int, long, float,
double, boolean and char are:
A primitive types
B object types
C variables
D math operators
E relational operators
Question 2: Primitive Types
In Java, the keywords byte, short, int, long, float,
double, boolean and char are:
A primitive types
B object types
C variables
D math operators
E relational operators
Question 3: Variable Declaration
Which is the best variable declaration for the
number of people in your family?
A boolean foo;
B boolean familyMemberCount = 1;
C int familyMemberCount = 1;
D float familyMemberCount = 1;
E double familyMemberCount = 1;
Question 3: Variable Declaration
Which is the best variable declaration for the
number of people in your family?
C
int familyMemberCount = 1;