1. What is Java?
Why was the Java programming language created?
*C. Java was created to produce applications for small
appliances.(1995年Java衍生自smalltalk最初设计应用于电视机顶盒的嵌入式系统,而后在网络层内意外的大获成就)
Which of the following programming paradigms
allows a programmer to develop software based on
entities that simulate real world concepts?
*C. Object Oriented Programming(这门语言可以成为C系列语言中最优秀的,既没有像C++一样的过度设计,又良好的参照了Java的特点)
Which one of the following Java keywords is
required when declaring the main method that is
the start of a Java application?
*A. static (每个函数中只有一个main函数,其唯一性就需要被static确定)
Which of the following is used to create the file
containing the Java instructions?
*D. text editor
Which of the following is true of the Java
programming language?
*D. Code is written in small manageable pieces(每个类更像类,而不像C++一样,几乎被公认为是子程序。)
Which of the following could possibly cause a
runtime error?
*C. divide by zero (在Java中,有几种运行时错误,按层次)
Which of the following provides the correct
definition of an application?
*B. Computer programs that accept data and produce
useful information.
Where can you find the BlueJ IDE?
*A. http://www.bluej.org
What must all Java applications contain?
*C. a main method
Which of the following computer components are
referred to as hardware?
*C. monitor, CPU, and keyboard
Which of the following hardware components is
considered to be the brain of a computer?
*A. CPU
Which sequence best describes the physical steps
taken to produce a running Java program?
*C. Write the program.
Compile to bytecode.
Run program.
Which of the following is an example of a keyword
that is used to specify access?
*B. public(参照了C)
Which of the following computer components is
referred to as a peripheral(外设) device?
*D. Mouse
How can you supply data immediately to your
program when you invoke it?
*B. By typing it on the command line.
Which of the following are used to instruct a program to
perform mathematical calculations or a test of data?
*D. operators(运算操作符)
Which of the following memory types is known as
volatile memory?
*C. RAM
Which of the following programming paradigms
requires a programmer to use a divide and conquer
approach to software development?
*D. Procedural Programming
(Procedural programming can sometimes be used as a synonym for imperative programming (specifying the steps the program must take to reach the desired state), but can also refer (as in this article) to a programming paradigm, derived from structured programming, based upon the concept of the procedure call.)
---------------------------------------------------
What is the extension of a Java bytecode file?
*A. .class
What are the tools: javac, appletviewer, javadoc,
and jar a part of?
*B. J2SDK
Which of the following is the machine independent
part used in the execution of a Java program?
*A. bytecode
Why do humans need high-level programming
languages?
*B. Computers process everything in binary and all
information must be converted to binary.
Which of the following programming paradigms do
the Java programming language use?
*B. Object Oriented
Which of the following JDK utility programs is used
to compile a Java source code file into bytecode?
*C. javac
Which of the following uses the correct syntax for a
main() method that starts a Java application?
*C. public static void main(String args[])
2. Object-Oriented Programming
Which of the following terms describes the process
of hiding information in an object?
*A. Encapsulation 封装
Which of the following terms refers to a method
that is used to retrieve data from an object?
*B. Accessor 检索数据 —》访问器
Which of the following is not a compartment of the
Rectangle class symbol?
*C. Instance variables
What does a constructor method do?
*D. It specifies the data values an object will store upon
creation.(产生数据值)
What is "object think"?
*B. A term used to describe how a programmer should
approach the problem specifications.
What is the name of the method that contains the
instructions for cleanup before an object is
destroyed?
*A. Finalizer(Finally类永远是程序最后执行的,这是虚拟机的垃圾回收规定的,我们可以复写,但是默认总存在)
What is a class?
*D. a blueprint or specification of an object
What is the name of the Java library of classes?
*A. API( Application Programming Interface )
Which of the following words is a keyword from the
Java language?
*D. private
What is the best group of methods for a bank
savings account object?
*B. get balance, add interest, set balance, get account
number, set account number
What can be represented as an object?
*C. Almost anything can be considered an object.
What does a method signature not provide?
*C. Object type
What is the name of the uniform system of symbols
and terms used to communicate the design of
classes and applications?
*C. UML Unified Modeling Language
What is another name for an object identifier?
*D. Object reference
Task related objects do not contain which of the
following items?
*B. Client objects
When programmers use "public String getName()",
what are they calling the objects method getName
to do?
*B. Go to the object Name to retrieve data (get…set…)
When using containment and inheritance, what are
two ways that objects can be related?
*B. One object may know about another object and one
object may be part of another object.
Which keyword is used to request that an object be
created?
*C. new
What are mutators(存取器)and constructors called in
object speak?
*D. Accessors
Which of the following choices is an instance of a
class Cycle?
*A. MountainBike
Which of the following terms refers to a method
that accomplishes a non-standard task in a class?
*D. custom method
Which terms are used to describe how an object
knows to do things?
*A. Behaviors and methods
What best describes an accessor?
*D. A method that uses standard ways of retrieving data
from an object.
The term "object attribute" could be best described
by which of the following choices?
*B. Object attributes are what the "object knows."
When using the Java language, a programmer can
accomplish many tasks by what means?
*C. by describing objects and defining how the objects will
interact
3. Java Language Elements
What is the file extension of a Java source file?
*C. .java
What does Java use to delineate a block of
statements?
*A.
What refers to a five faceted storage location in
memory that is used to store data?
*B. Variable
What is available to all objects and methods while
the program is running?
*C. Static storage
Which of the following uses the correct syntax to
instantiate a class?
*D. Point p = new Point();
Which of the following Java commands is used to
create documentation in HTML format from a Java
source code file?
*D. javadoc
Where does Java store data that is required or
referenced by methods?
*B. stack
Which of the following choices is dynamic and the
second fastest storage space?
*D. Stack
-------------------总结上面的几个题--------------------------------
(1) 堆栈。驻留于常规RAM(随机访问存储器)区域,但可通过它的“堆栈指针”获得处理的直接支持。堆栈指针若向下移,会创建新的内存;若向上移,则会释放那些内存。这是一种特别快、特别有效的数据保存方式,仅次于寄存器。创建程序时,Java编译器必须准确地知道堆栈内保存的所有数据的“长度”以及“存在时间”。这是由于它必须生成相应的代码,以便向上和向下移动指针。这一限制无疑影响了程序的灵活性,所以尽管有些Java数据要保存在堆栈里——特别是对象句柄,但Java对象并不放到其中。