<< Chapter < Page Chapter >> Page >

Answer 10

Question 11

True or False? The execution of a Java application begins and ends in the method named main .

Answer 11

Question 12

True or False? The two commands shown in Listing 4 can be used to compile and execute a Java application named Prob01 where:

  • The only special class library required is contained in the folder named bookClasses .
  • The path from the root to the folder named bookClasses is represented by ---\bookClasses.
Listing 4 . Question 12.
javac -cp .;---\bookClasses Prob01.java java -cp .;---\bookClasses Prob01

Answer 12

Question 13

True or False? The Java compiler program is named java.exe .

Answer 13

Question 14

True or False? The Prob01.java and Prob01 at the ends of the two commands in Listing 4 specify the files being operated on by the virtual machine and the compilerrespectively.

Answer 14

Question 15

True or False? In Listing 4 , the -cp indicates that a classpath follows.

Answer 15

Question 16

True or False? A classpath consists of one or more path specifications separated by semicolon characters.

Answer 16

Question 17

True or False? The purpose of the classpath in Listing 4 is to tell the compiler and the virtual machine where to look for source codefiles that the application needs in order to successfully compile and execute.

Answer 17

Question 18

True or False? The period ahead of the semicolon in Listing 4 says to search the root folder first.

Answer 18

Question 19

True or False? The first statement in the body of the main method in Listing 1 instantiates a new object of the class named Prob01Runner .

Answer 19

Question 20

True or False? The first statement in Listing 1 saves a reference to a new object of the class named Prob01Runner in a reference variable named obj . In general, the type of the variable must be:

  • The name of the object, or
  • The name of a superclass of the object, or
  • The name of an interface implemented by the object.

Answer 20

Question 21

True or False? In Java, you must save a reference to a newly instantiated object in order to gain access to that object later in the program.

Answer 21

Question 22

True or False? The second statement in the body of the main method in Listing 1 uses the reference stored in the variable named obj to call the method named run encapsulated in the object referred to by the contents of obj .

Answer 22

Question 23

True or False? The following three methods that are called in Listing 1 are of a type that is commonly referred to as accessor methods . They are also sometimes referred to by the slang term getter methods .

  • getMars
  • getJoe
  • getSue

Answer 23

Question 24

True or False? The method named println that is called in Listing 1 is a member of Ericson's multimedia library. The purpose of the println method is to display text on an image.

Answer 24

Question 25

True or False? Java uses four access modifiers to specify the accessibility of various classes and members in a Java application:

  • public
  • private
  • protected
  • package-private

Answer 25

Question 26

True or False? Listing 5 shows the beginning of a class named Prob01Runner .

Listing 5 . Question 26.
class Prob01Runner{ //Instantiate the World and Turtle objects.private World mars = new World(300,274); private Turtle joe = new Turtle(mars);private Turtle sue = new Turtle(mars);

Questions & Answers

what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Object-oriented programming (oop) with java. OpenStax CNX. Jun 29, 2016 Download for free at https://legacy.cnx.org/content/col11441/1.201
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Object-oriented programming (oop) with java' conversation and receive update notifications?

Ask