This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Abstract class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Abstract class" Watch "Abstract class" New topic
Author

Abstract class

sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

What is the'Well known abstract class without methods'?

It's called a badly designed class
I'm looking forward to the answer too.


[My Blog]
All roads lead to JavaRanch
dhwani mathur
Ranch Hand

Joined: May 08, 2007
Posts: 621
I dont have any idea on this.
Please let me know the answer,if you get it.
Sunil Tandon
Greenhorn

Joined: Jun 25, 2007
Posts: 9
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

Joined: Dec 28, 2006
Posts: 893
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?


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
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.


Rahul Bhattacharjee
LinkedIn - Blog
Bill Cruise
Ranch Hand

Joined: Jun 01, 2007
Posts: 148
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

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

Joined: Jan 02, 2007
Posts: 109
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract class
 
Similar Threads
abstract method
Regarding abstarct classes
Diff bw Abstract class and Interface
Static Methods in an Interface
HttpServlet