您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes
Introduction
Content
Apply
Reflect
Extend
previous.gif
 (3087 bytes)
next.gif
 (2959 bytes)

 
 
Apply Index
Apply Page # 8

Exercise 5 ?Methods Summary

Complete the following statements that summarise the concepts explored in the 'Packages and Imports' section of this unit:

A ___________ is a special method that is called automatically as soon as an object is created. 

The constructor method should __________ the object ?by assigning sensible values for its _________. 

A constructor method is indicated by a method that has the same _________ (name) as the class. 

A constructor is a ______, and may have _________ like other methods. 

It is common practice to provide every class with a both a ___________ and a toString() method.

Discussion of Exercise 5
Back to content

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright © 1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg