
04-28-2008, 12:37 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,532
|
|
Originally Posted by sanjeevtarar
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.
Originally Posted by sanjeevtarar
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.
Originally Posted by sanjeevtarar
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?
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)
|