Vous êtes sur la page 1sur 4

c 

? ? Which statement is true about a method?

Select the one correct answer.

a. A method is an implementation of an abstraction.


b. A method is an attribute defining the property of a particular abstraction.
c. A method is a category of objects.
d. A method is an operation defining the behavior for a particular abstraction.
e. A method is a blueprint for making operations.

?  Which statement is true about an object?

Select the one correct answer.

a. An object is what classes are instantiated from.


b. An object is an instance of a class.
c. An object is a blueprint for creating concrete realization of abstractions.
d. An object is a reference to an attribute.
e. An object is a variable.

?  Which line contains a constructor in this class definition?

© 



 ©

© 

   
 © 
    
  ©  © 


© 
 



©   
 
 

©    © 
 ©  © © 


Select the one correct answer.

a. Code marked with (1) is a constructor.


b. Code marked with (2) is a constructor.
c. Code marked with (3) is a constructor.
d. Code marked with (4) is a constructor.
e. Code marked with (5) is a constructor.
c 

?  Given that º 
 is a class, how many objects and how many reference variables are
created by the following code?

º 
  !!
 
"º 

º 

 #
"º 


Select the two correct answers.

a. ‘ne object is created.


b. Two objects are created.
c. Three objects are created.
d. ‘ne reference variable is created.
e. Two reference variables are created.
f. Three reference variables are created.

?  What command in the Java SDK should be used to compile the following code contained in
a file called  $ %&?

©  $ 


©     
 
'( # % %© 

)* 
 +,)


Select the one correct answer.

a. & $ 
b. & $ 
c. & $ %&
d. & $ %&
e. & $  

?  What command in the Java 2 SDK should be used to execute the 


 method of a class
named  $ ?

Select the one correct answer.

a. & $ 
b. & $ 
c. & $ %&
d. & $ %
e. & $ % 



c 
? 

 

   
 


c   

   

   -%%%-
   -%%%-
    -%%%-
 -%%%-
  -%%%-

? 

    | + 



  
 
 

  

c   

   

 | +| +
 | +| +
 ©  !
| +
  | +
 ©    | + 
'( 
   | +
? 

     

c   

   

     


 

 
 
     ©  
 
 
     
 
 
     
 
 
 
    
   
 

? ?

   


  

  

 


© .#
c 

 
©  .#
©   ©  
©     
 
'( 
.#

".#

".#


c   

   

 

 

 !" 
 
 
  #   
 

 

 "   

  
 

 

 

 $"   

 
 
 % 

 
# 

 º 

 
 #


Vous aimerez peut-être aussi