Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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).]
reply
    Bookmark Topic Watch Topic
  • New Topic