View Single Post
  #2 (permalink)  
Old 04-28-2008, 12:37 PM
Eranga's Avatar
Eranga Eranga is offline
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,532
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by sanjeevtarar View Post

1) In which scenario one should go for Abstract Class rather than Interface.
I use interface rather than abstract, if I can see that something is change frequently. I mean If you want to make changes. may be in design, make them as interface. Abstract class may have default implementation. That is because, abstract class only allowed to subclasses.

Quote:
Originally Posted by sanjeevtarar View Post
2) Can Abstract class have contractor? If yes then when it is called? and can it be private?

Abstract class can have constructor and, it can be private.



Quote:
Originally Posted by sanjeevtarar View Post
3) Where we can use abstract keyword in Java(like before class declaration,variable declaration etc.).
What you mean here? Looking how to define an abstract class?

Code:
abstract public class testClass() { }
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 27, 2008)
Reply With Quote