InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Can You Write A Java Class That Could Be Used Both As An Applet As Well As An Application? |
|
Answer» YES. ADD a MAIN() METHOD to the APPLET. Yes. Add a main() method to the applet. |
|
| 2. |
What Is A Signed Applet? |
Answer»
|
|
| 3. |
How Would You Communicate Between Applets And Servlets? |
|
Answer» We can use the java.net.URLConnection and java.net.URL classes to open a standard HTTP connection and "tunnel" to a Web SERVER. The server then passes this information to the SERVLET. Basically, the applet pretends to be a Web browser, and the servlet doesn't know the difference.
We can use the java.net.URLConnection and java.net.URL classes to open a standard HTTP connection and "tunnel" to a Web server. The server then passes this information to the servlet. Basically, the applet pretends to be a Web browser, and the servlet doesn't know the difference.
|
|
| 4. |
What Are The Methods That Control An Applet’s On-screen Appearance? |
|
Answer» The methods that control an applet’s on-screen appearance I.e. update and paint. The methods that control an applet’s on-screen appearance I.e. update and paint. |
|
| 5. |
How Can We Determine The Width And Height Of A Applet? |
Answer»
|
|
| 6. |
What Are The Attributes Of Applet Tags? |
Answer»
|
|
| 7. |
Explain How To Read Information From The Applet Parameters. |
|
Answer» The getParameter() method can be USED within the init() method to access the parameter data. The getParameter() method can be used within the init() method to access the parameter data. |
|
| 8. |
What Type Of Sound File Formats Can I Use For The Applets? |
|
Answer» Java v1.02 only supports the "voice format" of the .au sound files. This is ALSO know as "µ-law, 8/16-bit, MONO, 8000hz sample RATE" Java v1.02 only supports the "voice format" of the .au sound files. This is also know as "µ-law, 8/16-bit, mono, 8000hz sample rate" |
|
| 9. |
Why Do You Canvas? |
|
Answer» The Canvas class of java.awt is used to PROVIDE CUSTOM drawing and event handling. It provides a general GUI component for drawing images and text on the SCREEN. It does not SUPPORT any drawing methods of its own, but provides access to a Graphics object through its paint() method. The paint() method is invoked upon the creation and update of a canvas so that the Graphics object ASSOCIATED with a Canvas object can be updated. The Canvas class of java.awt is used to provide custom drawing and event handling. It provides a general GUI component for drawing images and text on the screen. It does not support any drawing methods of its own, but provides access to a Graphics object through its paint() method. The paint() method is invoked upon the creation and update of a canvas so that the Graphics object associated with a Canvas object can be updated. |
|
| 10. |
What Is The Base Class For All Swing Components? |
|
Answer» JComponent (EXCEPT top-level CONTAINERS) JComponent (except top-level containers) |
|
| 11. |
How Do You Communicate In Between Applets And Servlets? |
|
Answer» We can use the java.net.URLConnection and java.net.URL classes to OPEN a standard HTTP connection and "tunnel" to the web SERVER. The server then passes this information to the servlet in the normal way. Basically, the applet PRETENDS to be a web browser, and the servlet doesn't know the difference. As FAR as the servlet is concerned, the applet is just another HTTP CLIENT We can use the java.net.URLConnection and java.net.URL classes to open a standard HTTP connection and "tunnel" to the web server. The server then passes this information to the servlet in the normal way. Basically, the applet pretends to be a web browser, and the servlet doesn't know the difference. As far as the servlet is concerned, the applet is just another HTTP client |
|