aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes regarding class definition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "regarding class definition" Watch "regarding class definition" New topic
Author

regarding class definition

ronak mehta
Greenhorn

Joined: Aug 14, 2001
Posts: 23
1) Which of the following is an abstract class
public abstract abc( );
public abstract void ABC( );
public abstract ABC( ) { };
Bhaskar Selvaraju
Greenhorn

Joined: Jul 04, 2001
Posts: 29
public abstract abc( );
public abstract void ABC( );
public abstract ABC( ) { };
None of these are abstract classes. an abstract class looks like this
abstract class Abs{
public void abmeth();
public void normalmeth(){
System.out.prinltn("I am a normal method");
}
}
Just a basic one
ronak mehta
Greenhorn

Joined: Aug 14, 2001
Posts: 23
u are right. but they give the second one. public abstract void ABC() is abstract class. really it is not right?
swati bannore
Ranch Hand

Joined: Oct 18, 2000
Posts: 201
Bhaskar,
U need to define method "public void abmeth();" as abstract or else compiler will give u error asking u to define a method body or declare it as abstract..
thx
[This message has been edited by swati bannore (edited August 18, 2001).]


Swati Kale
SCJP
SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding class definition
 
Similar Threads
Constructor??
Abstract classes - instantiation
Overridding abstract methods
about abstract method and class
Can an abstract class contain a constuctor?