applet - Understanding this keyword in Java -


When events are registered in the init () method of applet, we add the method AddTypeListener (this) .

But I know that the keyword this refers to the object which is called the method. Therefore, when we have not created an object in the applet class, then this < / Code> What happens? Please clarify your doubts.

cause this when you work in heaven 't Clearly has made an example of your applet because JRE treats applets differently.

The applet is a special class that is loading Java for you immediately. From there, the object is owned by JRE and is interfacing in this way.

Once Java creates an example of your applet, then the caller calls it to call init () (since a prototype) manufacturer.

Similarly, when your applet is done or the page gets unloaded, then Java worries about closing your applet.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -