WITH COMPLETE SOLUTION
What happens when a Java array is indexed with an invalid value? - Answer- an out of
bounds error
Name four basic activities that are involved in a software developing process - Answer-
Design, Implementation, Testing, Maintenance
What does the this reference refer to - Answer- the currently executing object
write a polymorphic statement that will declare an object of type structure, but create a
reference to the class residence - Answer- Structure myStructure = new Residence;
suppose all of the classes have a method called materials() that is implemented in
different ways. At what time will the particular version of materials() be determined? -
Answer- at run time
We cannot assign a value of one type to a variable of an incompatible type - Answer-
True
Java's coordinate system has the origin in the middle of the creed with negative coords
to the bottom and left and positive to the right and top - Answer- False
An escape sequence can be used to represent a character that would otherwise cause
compilation problems - Answer- True
A class that is used ONLY when developing Java GUI programs - Answer- Swing
Java must be syntactically correct or the compiler will not produce _____________. -
Answer- Bytecode
Program ______ involves breaking a solution down into manageable pieces - Answer-
design
Each object has a state, defined by its ______, and a set of behaviors defined by its
_______. - Answer- Data/methods
The three kinds of errors encountered in program development are ____, _____, and
_____. - Answer- Syntax/run-time/logic
, The addition operator has a higher precedence than the subtraction operator - Answer-
False
A class is a blueprint of an object; that is, multiple objects can be created from one class
definition - Answer- True
Multiple reference variables can refer to the same object - Answer- true
Classes from java.lang package are automatically imported for all Java programs -
Answer- True
A variable is a name for a memory location used to hold a value of a particular data type
- Answer- True
Identifier names should be descriptive and readable - Answer- True
The foreground color is set using the setColor method of the Swing class - Answer-
True
A bounding rectangle is used to define the position and size of curved shapes - Answer-
True
All methods of the Math class are invoked through names of primitive variables and
other objects - Answer- False
A Java compiler translates Java source code into English commands that only the IBM
platform can understand - Answer- False
The ____ class provides methods for reading input of various types from various
sources. - Answer- Scanner
____ are Java programs that are usually transported across a network and executed
using a Web browser - Answer- applets
_____ hold a particular value for the duration of their existance - Answer- Constants
java has two kinds of numeric values, ____ and _____ - Answer- integer/real
The Java standard class library is organized into ______ - Answer- packages
______ types are type-safe, ensuring that invalid values will not be used - Answer-
enumerated
______ provides automatic conversions between primitive values and corresponding
wrapper objects - Answer- Autoboxing