cop2258, quiz 3
1.) .java 2.) .class
What is the Java source filename extension? What is the Java bytecode filename extension? 1.) .java 2.) .js 1.) .class 2.) .java 1.) .java 2.) .class 1.) .class 2.) .jv
false
A block begins with an opening bracket ([) and ends with a closing bracket (]). True False
1.) // 2.) /* */
How do you denote a comment line? How do you denote a comment paragraph? 1.) // 2.) /* /* 1.) // 2.) /* */ 1.) *// 2.) // 1.) /* 2.) /*/
a)Runtime Errors
If your program needs to read integers, but the user entered strings. What kind of error is this? a)Runtime Errors b)Logic Errors c)Syntax Errors d)Semantic Errors
a)Java bytecode
Java compiler translates Java source code into ___________. a)Java bytecode b)assembly code c)another high-level language code d)machine code
e)SmartPet.java
Suppose you define a Java class as follows: public class SmartPet { } In order to compile this program, the source code should be stored in a file named ___________. a)smartpet.java b)SmartPet.txt c)SmartPet.class d)Any name with .java extension. e)SmartPet.java
b)Logic Error
Suppose you write a program for computing the perimeter of a rectangle and you mistakenly write your program so that it compiles the area of a rectangle. What kind of error is this? a)Compiler Error b)Logic Error c)Runtime Error d)Syntax Error
b)floating-point numbers
The double data type can be used to store a)long integers b)floating-point numbers c)true or false values d)whole numbers only
d)Integrated Development Environment
What does IDE stand for? a)Independent Development Environment b)Integrated Delimiter Element c)Integer Development Environment d)Integrated Development Environment
d)Identifying and fixing any bugs.
What does debugging an application entail? a)Running it to see if it works correctly. c)Compiling it to make sure it doesn't contain any syntax errors. d)Identifying and fixing any bugs.
a)The application will end abnormally.
What happens when a runtime error occurs? a)The application will end abnormally. b)The application will get caught in an infinite loop that you have to cancel out of. d)The results of the application will be inaccurate.
a)salesTax
Which of the following is a valid variable name? a)salesTax b)double c)25Percent d)input-string
d)Your code compiles and runs faster.
Which of the following isn't a benefit of a typical IDE for Java? a)The syntax of your code is checked as you enter it. b)The IDE helps you complete code as you type. d)Your code compiles and runs faster. e)The debugging features make it easier for you to find bugs in your applications.
a)Java virtual machine
____________ is the software that interprets the Java bytecode. a)Java virtual machine b)Java API c)Java debugger d)Java compiler