Java Ch 1
Java language interpreter
After a successful compile, you can run the class file on any computer that has a ____.
compile, interpret
After you write and save a Java application file, you ____ and then ____ it.
semicolon
All Java programming statements must end with a ____.
True
Although not a requirement, it is Java standard that class identifiers begin with an uppercase letter and use other uppercase letters to improve readability.
object
An instance of a class is a(n) ____.
parentheses
Arguments to methods always appear within ____.
True
Dots (or periods) in a Java statement are used to separate the names of the components that make up the statement.
object-oriented programming
Envisioning program components as objects that are similar to concrete objects in the real world is the hallmark of ____.
Machine code
If a compiler detects a violation of language rules, it refuses to translate the class to ____.
True
If an object's methods are well written, the user is unaware of the low-level details of how the methods are executed, and the user must simply understand the interface or interaction between the method and the object.
Class path
If you receive an error that states, "Exception in thread 'main' java.lang.NoClassDefFoundError," when you try to execute the application, you probably do not have your ____ set correctly.
Static
In Java, the reserved keyword ____ means that a method is accessible and usable even though no objects of the class exist.
DOS
In a ____ environment, you can change directories using the cd command. For example, to change to a directory named MyClasses, you type cd MyClasses and press Enter.
Hello, World!
It is a tradition among programmers that the first program you write in any language produces "____" as its output.
Simplest
It is best to use the ____ available text editor when writing Java programs.
JOptionPane
Java contains a class named ____ that allows you to produce dialog boxes.
Java Virtual Machine
Java does not execute instructions on a computer directly, but rather on the ____.
neutral
Java is architecturally ____.
line, block
Java supports three types of comments: ____, ____, and javadoc.
Two forward slashes
Line comments start with ____.
Debugging
Locating and repairing all syntax errors is part of the process of ____ a program.
False
Logic errors are easily identified when a program is compiled.
Variables
Named computer memory locations are called ____.
comments
Non-executing program statements that provide documentation are called program ____.
Applets
Programs that are embedded in a Web page are called Java ____.
False
Question 10 Unsaved Using the void keyword in the main() method header indicates that a value will be returned by the main() method is called.
False
System software is used for tasks such as word processing, calculations and playing games.
API
The Java ____ contains information about how to use every prewritten Java class, including lists of all the methods you can use with the classes.
Java
The command to execute a compiled Java application is ____.
procedures
The individual operations used in a computer program are often grouped into logical units called ____.
Syntax
The rules of a programming language constitute its ____.
state
The values of an object's attributes also are known as its ____.
import
Using a(n) ____ statement, Java allows you to access built-in classes that are contained in a group of classes called a package.
False
When you issue the command to compile a class containing errors, the Java compiler does not produce any error messages. You will first need to run the class in order to see error messages.
Java
When you run a Java application using the ____ command, do not add the .class extension to the filename.
recompile
When you run your program you don't see evidence of the changes you just made to it. You realize that you forgot to ____ the program.
Commas
Whenever a method requires multiple arguments, the arguments are always separated with ____.
True
You must use the Java interpreter to translate the bytecode into executable statements before running a Java application.
.java
You save text files containing Java source code using the file extension ____.
Procedures
____ are also called modules, methods, functions, and subroutines. Java programmers most frequently use the term "method."
Arguments
____ are pieces of information that are sent into, or passed to, a method, usually because the method requires the information to perform its task or carry out its purpose.A
Polymorphism
____ describes the feature of languages that allows the same word to be interpreted correctly in different situations based on the context.
Parsing
____ is the process the compiler uses to divide your source code into meaningful portions; the message means that the compiler was in the process of analyzing the code when the end of the file was encountered prematurely.
Encapsulation
____ refers to the hiding of data and methods within an object.
access specifier
A(n) ____ defines the circumstances under which a class can be accessed and the other classes that have the right to use a class.
machine language
the most basic circuitry-level computer language which consists of on and off switches
Public
{ public static void main(String[] args) { System.out.println("First Java application"); } } Given the above code, which item identifies the access specifier? Question options:
False
A Java identifier can contain only letters, digits, ampersands, or number signs.
Run time error
A ____ is an error not detected until the program asks the computer to do something wrong, or even illegal, while executing.
compiler
A ____ translates high-level language statements into machine code.
True
A compiler ignores whitespace (that is, any combination of nonprinting characters) between words and lines.
Machine language
A program written in ____ is the most basic circuitry-level language.
Void public class First { public static void main(String[] args) { System.out.println("First Java application"); } } Given the above code, which item identifies the method's return type?
public class First { public static void main(String[] args) { System.out.println("First Java application"); } } Given the above code, which item identifies the method's return type?
First
public class First { public static void main(String[] args) { System.out.println("First Java application"); } } Given the above code, which item identifies the name of the class?