• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

regarding class definition

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Which of the following is an abstract class
public abstract abc( );
public abstract void ABC( );
public abstract ABC( ) { };
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
u are right. but they give the second one. public abstract void ABC() is abstract class. really it is not right?
 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
this llama doesn't want your drama, he just wants this tiny ad for his mama
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic