where is the body of abstract method : public abstract Image getImage(String filename);
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mandar_Pohnerkar
Posted On:   Tuesday, June 18, 2002 06:32 AM

Hi I would like to know how the jvm interprets this method . The declaration of getImage()method of class ToolKit.java in the java source "src.jar" is as follows. public abstract Image getImage(String filename); Now when we want to use this method ,like Image img=Toolkit.getDefaultToolkit().getImage("abc.jpg"); we just call it and pass appropriate argument.But my question is where is the body of this method.As the method is abstract ,we need to provide body for this method but even if we dont provide it works ?How ? Thnaking You, Mandar    More>>


			

Hi

I would like to know how the jvm interprets this method .
The declaration of getImage()method of class ToolKit.java in the java source "src.jar" is as follows.
public abstract Image getImage(String filename);

Now when we want to use this method ,like

Image img=Toolkit.getDefaultToolkit().getImage("abc.jpg");

we just call it and pass appropriate argument.But my question is where is the body of this method.As the method is abstract ,we need to provide body for this method but even if we dont provide it works ?How ?

Thnaking You,
Mandar


   <<Less

Re: where is the body of abstract method : public abstract Image getImage(String filename);

Posted By:   George_Tzallas  
Posted On:   Wednesday, June 19, 2002 02:00 AM

The implementation is provided by a non-abstract class class that extends
java.awt.Toolkit. This implementation is retrieved with the call to Toolkit.getDefaultToolkit ()


Kind regards


George T

About | Sitemap | Contact