Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Abstract class

 
sridhar lakka
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In an interview I have been asked a question What is the'Well known abstract class without methods'?
Please tell me, I dont know the answer for this.

Regards,
Sree
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the'Well known abstract class without methods'?

It's called a badly designed class
I'm looking forward to the answer too.
 
dhwani mathur
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont have any idea on this.
Please let me know the answer,if you get it.
 
Sunil Tandon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm.. I had heard about few marker interfaces flying around like the java.io.Serializable interface which do not declare any methods. The abstract classes with no interfaces are called marker classes, but can't site you any example of such an interface.
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just choose a Marker interface:

I think the most "well known" are:

java.lang.Cloneable
java.io.Serializable
java.util.EventListener

For more information the following link will help you?

What is a "marker" interface?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Remko Strating:
Just choose a Marker interface:


I understand what you are trying to mean , but how can interface be class.The post specifically says about abstract class.
 
Bill Cruise
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the question is supposed to be "abstract class without abstract methods."

It seems to be HttpServlet.

http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpServlet.html

This is an interesting bit of trivia, but I don't see how it helps an interviewer screen you.
[ June 25, 2007: Message edited by: Bill Cruise ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't call marker interfaces abstract classes There are interfaces. If the sridhar could bring some light on what he was asked exactly...
 
sridhar lakka
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question is very clear,
I am not asking about Marker/Tagged interface. "Very familiar abstract class which doesn't have any(abstract/concrete) methods".
I think now it is clear.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic