Objective Assessment
STUDY GUIDE
Introduction to Programming in Java
Western Governors University
This document provides a focused study guide
• The guide is structured to help students
reinforce understanding, identify weak areas,
and prepare confidently for the assessment.
• you can review quickly and walk into exam
confident and prepared.
, Western Governors University - C169
Completed Course Study Guide
1.Where is a program typically stored when it is not running?
A. in the core processor
B. in the primary storage
C. in the cpu
D. in the secondary storage: D. in the secondary storage
2.What is an applet?
A. An operating system plug-in that supports Java-enabled browsers
B. Java code that can be located anywhere on the internet
C. Java code that resides on a client browser
D. A browser plug-in that allows Java code to run: B. Java code that can be located anywhere on the internet
3.What happens when the compile option is selected in a Java integrated development environment (IDE)?
A. The IDE scans the code and checks for syntax errors without translating or executing.
B. The IDE interprets and executes Java code directly
C. The IDE translates the Java code into machine-specific instructions.
D. The IDE enters a context-sensitive mode that flags coding errors as information is entered: C. The IDE
translates the Java code into machine-specific instructions.
The IDE interprets and executes Java code directly-this is more Java Vitural machine
4.The Java programming environment includes the Java Development Kit (JDK), the Java Runtime
Environment (JRE), and the Java Virtual Machine (JVM). What are the relationship of these three
components?
A. The JRE contains the JDK and JVM
B. The JDK contains the JVM but not the JRE
C. The JDK contains the JRE but not the JVM
D. The JRE contains the JVM but not the JDK: D. The JRE contains the JVM but not the JDK
5.Given the following Java code:
System.out.println ("Hello, World!");
Match each code item to the correct description. Answer options may be used more than once or not at all.
System.out
println
();
"Hello, World!"
Choices: Method; Parameter Delimiter; String; Object: (); - Parameter Delimiter
Println - Method
System.out - Object
"Hello World!" - String
,6.Given the following Java code:
System.out.println ("Hello, World!");
What does System.out represent?
A. An object
B. A method
C. A library
D. A package: A. An object
7.Which variable is a Boolean?
A. 101.5
B. True
C. 12.345
D. 'r': B. True
8.Given the following code:
String baseball = "Game"
Match each declaration part with the correct defining term. Answer options may be used more than once or
not at all.
String
Baseball
=
"Game"
Choices: Variable Type; Variable Name; Assignment Operator; Value: String - Variable Type
Baseball - Variable Name
= - Assignment Operator
"Game" - Value
9.Given the following code:
Dog collie = new Dog ("Lassie");
There is one variable in this code. What is it's type?
A. New
B. Collie
C. Dog
D. "Lassie": C. Dog
10.Which statement would allow an administrator to initialize a variable in Java?
A. double itemPrice=0;
B. go itemPrice==0;
C. integer itemPrice=0;
D. the itemPrice==0;: A. double itemPrice=0;
integer itemPrice=0 would have worked if the keyword int was used not interger
11.Which reserved word, when added to a variable declaration, makes its value unchangeable?
A. Final
B. Const
C. Super
, D. Reserve
E. protected: A. Final
12.Given the following Java code:
Rectangle canvas = new Rectangle (25, 25, 25, 25);
Rectangle canvas2 = canvas;
canvas.setColor (Color.YELLOW);
canvas2.setColor(Color.RED);
canvas.fill ();
What does the system do when this code is run?
A. Draws a yellow rectangle and a red rectangle
B. Draws an orange rectangle
C. Draws a yellow rectangle
D. Draws a red rectangle: D. Draws a red rectangle
"new" keyword is the is the RAM. is for creation
13.Which case should be used for Java variable names, assuming standard Java naming conventions?
A. Lower case
B. Upper camel case
C. Lower camel case
D. Upper case: C. Lower camel case-variables and methods(methods have parentheses)
Upper Camel Case- objects and Class
constructor-special method to allocate memory-formats the RAM.
14.When, in the development of a program, is the preferred time to develop test cases?
A. After producing output from the program
B. Before developing a flowchart
C. Before implementing the program
D. After implementing the program: C. Before implementing the program
Steps in development of a Program is
1. Determine Requirements
2. Design the program
3. Develop
4 Test
5 implement
15.Given the following Java code:
System.out.println ();
What will the system do?
A. Fail during Compile
B. Compile but fail to run