Java Exam UPDATED ACTUAL Exam Questions and CORRECT
Answers
You must have a return statement in a value-returning method. - True
In a @return tag statement the description ________. - describes the return value
Constants, variables, and the values of expressions may be passed as arguments to a method. -
True
In a general sense, a method is ________. - a collection of statements that perform a specific task
In the following code, System.out.println(num) is an example of ________. double num = 5.4;
System.out.println(num);
num = 0.0; - a void method
When you pass an argument to a method you should be sure that the argument's type is
compatible with ________. - the parameter variable's data type
Given the following method, which of these method calls is valid? public static void
showProduct (double num1, int num2)
{
double product;
product = num1 * num2;
System.out.println("The product is " + product); } - showProduct(3.3, 55);
Methods are commonly used to break a problem into small manageable pieces. - True
, Methods are commonly used to ________. - break a program down into small manageable pieces
RAM is usually ________. - a volatile type of memory, used for temporary storage
Variables are ________. - symbolic names made up by the programmer that represent memory
locations
A solid-state drive has no moving parts and operates faster than a traditional disk drive - True
Logical errors are mistakes that cause the program to produce erroneous results. - True
Software refers to ________. - programs
________ refers to the physical components that a computer is made of. - Hardware
Each byte is assigned a unique number known as an address. - True
Validating the results of a program is important to ________. - make sure the program solves the
original problem
A procedure is a set of programming language statements that, together, perform a specific task. -
True
Colons are used to indicate the end of a Java statement. - False
Which of the following is not a valid Java comment? - */ Comment two /*
Answers
You must have a return statement in a value-returning method. - True
In a @return tag statement the description ________. - describes the return value
Constants, variables, and the values of expressions may be passed as arguments to a method. -
True
In a general sense, a method is ________. - a collection of statements that perform a specific task
In the following code, System.out.println(num) is an example of ________. double num = 5.4;
System.out.println(num);
num = 0.0; - a void method
When you pass an argument to a method you should be sure that the argument's type is
compatible with ________. - the parameter variable's data type
Given the following method, which of these method calls is valid? public static void
showProduct (double num1, int num2)
{
double product;
product = num1 * num2;
System.out.println("The product is " + product); } - showProduct(3.3, 55);
Methods are commonly used to break a problem into small manageable pieces. - True
, Methods are commonly used to ________. - break a program down into small manageable pieces
RAM is usually ________. - a volatile type of memory, used for temporary storage
Variables are ________. - symbolic names made up by the programmer that represent memory
locations
A solid-state drive has no moving parts and operates faster than a traditional disk drive - True
Logical errors are mistakes that cause the program to produce erroneous results. - True
Software refers to ________. - programs
________ refers to the physical components that a computer is made of. - Hardware
Each byte is assigned a unique number known as an address. - True
Validating the results of a program is important to ________. - make sure the program solves the
original problem
A procedure is a set of programming language statements that, together, perform a specific task. -
True
Colons are used to indicate the end of a Java statement. - False
Which of the following is not a valid Java comment? - */ Comment two /*