CoboCards App FAQ & Wishes Feedback
Language: English Language
Sign up for free  Login

Get these flashcards, study & pass exams. For free! Even on iPhone/Android!

Enter your e-mail address and import flashcard set for free.  
Go!
All main topics / Informatik / Java

Java Final 3 (17 Cards)

Say thanks
1
Cardlink
0
A class is defined as a blueprint for an object and does not contain __.

A) properties or data
B) constructs
C) behavior or actions
D) a main method
D) a main method
2
Cardlink
0
If Triangle is defined as an object, which of the following statements declare, create and assign an object reference to the variable myTriangle?

A) Triangle myTriangle;
B) myTriangle = new Triangle( );
C) Triangle myTriangle = new Triangle( );
D) New Triangle( ):
C) Triangle myTriangle = new Triangle( );
3
Cardlink
0
When a variable of reference type is declared, the variable holds a special Java value, insertanswer,which means that the variable does not reference any object.
null
4
Cardlink
0
A data field that is defined in an object is referred to as an instance variable because it is insert answer a specific instance.
tied to
5
Cardlink
0
You can create an object without explicitly assigning it to a variable. An object created in this way is known as a(n) insert answer.
anonymous object
6
Cardlink
0
Which of the following statements is not true about a constructor of an object?

a. There can be multiple constructors in a class
b. If there is no constructor defined in a class, the system will generate a default constructor.
c. There can be one and only one constructor in a class
d. All of the above statements are true.
c. There can be one and only one constructor in a class
7
Cardlink
0
A constructor with no parameters is known as a ___.
default constructor
8
Cardlink
0
The private modifier cannot be used to define a class.

A) True
B) False
B) False
9
Cardlink
0
A data field defined as private __.
cannot be accessed from outside its class.
10
Cardlink
0
A method that regulates access to internal private data fields is called a(n) _.
accessor or setter method.
11
Cardlink
0
Like passing arrays, passing objects is actually passing the _ of the object.
reference
12
Cardlink
0
If you want all the instances of a class to share data, use ___ variables.
Static
13
Cardlink
0
The scope of a class variable is ___ .
The entire class regardless of where the variable is declared.
14
Cardlink
0
After an object is created, its data can be accessed and its methods invoked using the comma operator.

A) True
B) False
B) False
15
Cardlink
0
A private variable can be accessed by using the keyword __ .
this
16
Cardlink
0
Java enables you to define a special method in the class, known as the contractor that can be used to initialize an object’s data.

A) True
B) False
B) False
17
Cardlink
0
A class is considered immutable if ___ .
The entire class is private.
Flashcard set info:
Author: somgaet
Main topic: Informatik
Topic: Java
Published: 26.04.2010
 
Card tags:
All cards (17)
no tags
Report abuse

Cancel
Email

Password

Login    

Forgot password?
Deutsch  English