Core Java Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 2452 Page Views: 

Can applets communicate with each other?



Posted By: Avi Date: 30 October 2009 04:21:44 AM
 Answer:

Applets may communicate with other applets running in the same virtual machine. If the applets are of the same class, they can communicate via shared static variables. If the applets are of different classes, then each will need a reference to the same class with static variables. In any case the basic idea is to pass the information back and forth through a static variable.

An applet can also get references to all other applets on the same page using the getApplets() method of java.applet.AppletContext. Once you got a reference to an applet, you can communicate with it by using its public members.


Posted By: eTechPlanet


Date: 30 October 2009 04:21:44 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image 37sPCY
Related Questions
Core Java : What is synchronization?

What is synchronization?

synchronization is the capability to control the access of multiple threads to shared same resources....
Category: Core Java Date: 11/3/2010 3:22:47 PM
Core Java : How are Java source code files named?

How are Java source code files named?

A Java source code file takes the name of a public class or interface that is defined within the fil....
Category: Core Java Date: 11/3/2010 3:10:53 PM
Core Java : Can an object's finalize() method be invoked while it is reachable?

Can an object's finalize() method be invoked while it is reachable?

An object's finalize() method cannot be invoked by the garbage collector while the object is still r....
Category: Core Java Date: 11/3/2010 2:37:52 PM
Core Java : What is garbage collection?

What is garbage collection?

Garbage collection is the process of releasing memory used by unreferenced objects automatically.
Category: Core Java Date: 11/3/2010 2:05:51 PM
Core Java : What state does a thread enter when it terminates its processing?

What state does a thread enter when it terminates its processing?

It enters the dead state.
Category: Core Java Date: 11/3/2010 1:00:49 PM