View Single Post
  #13 (permalink)  
Old 05-02-2008, 09:09 AM
Eranga's Avatar
Eranga Eranga is offline
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,959
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
Hello Eranga,

You haven't answer....
Ok, just check these three classes.

Code:
abstract class AbstractClass { protected AbstractClass() { System.out.println("Abstract class constructor call."); } public abstract void distinctMethod(); public void ususalMethod() { System.out.println("A ususal method is call."); distinctMethod(); } }
Code:
public class AbstractDemo { public static void main(String args[]) { AbstractClass ref; //ref = new AbstractClass() { ref = new DeafultClass(); ref.ususalMethod(); } }
Code:
class DeafultClass extends AbstractClass{ public void distinctMethod() { System.out.println("Another method is call."); } }
__________________
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 September 4, 2008)

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