Самые популярные вопросы и ответы для интервью и онлайн-тесты
Образовательная платформа для подготовки к интервью, онлайн-тестов, учебных материалов и живой практики

Развивайте навыки с целевыми маршрутами обучения, пробными тестами и контентом для подготовки к интервью.

WithoutBook объединяет вопросы для интервью по предметам, онлайн-практику, учебные материалы и сравнительные руководства в одном удобном учебном пространстве.

Подготовка к интервью

Java Applet вопросы и ответы для интервью

Вопрос 6. What are the Applets Life Cycle methods? Explain them?

methods in the life cycle of an Applet: 

  • init( ) method - called when an applet is first loaded. This method is called only once in the entire cycle of an applet. This method usually intialize the variables to be used in the applet.
  • start( ) method - called each time an applet is started.
  • paint( ) method - called when the applet is minimized or refreshed. This method is used for drawing different strings, figures, and images on the applet window.
  • stop( ) method - called when the browser moves off the applet's page.
  • destroy( ) method - called when the browser is finished with the applet.

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 7. What is the sequence for calling the methods by AWT for applets?

When an applet begins, the AWT calls the following methods, in this sequence:

  1. init()
  2. start()
  3. paint() 

When an applet is terminated, the following sequence of method calls takes place:

  1. stop()
  2. destroy()

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 8. How do Applets differ from Applications?

Following are the main differences:

Application: Stand Alone, doesn't need web-browser.

Applet: Needs no explicit installation on local machine. Can be transferred through Internet on to the local machine and may run as part of web-browser.

Application: Execution starts with main() method. Doesn't work if main is not there.

Applet: Execution starts with init() method.

Application: May or may not be a GUI.

Applet: Must run within a GUI (Using AWT). This is essential feature of applets.

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 9. Can we pass parameters to an applet from HTML page to an applet? How?

We can pass parameters to an applet usingtag in the following way:

  • <param name="param1″ value="value1″>
  • <param name="param2″ value="value2″>

Access those parameters inside the applet is done by calling getParameter() method inside the applet. Note that getParameter() method returns String value corresponding to the parameter name.

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 10. In our URLs and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?

Since 2.00 version our applets support an user-defined delimiter for the menu arguments. To modify the default delimiter add the following parameter (you can use any character as a delimiter):

<param name="delimiter" value="~"> and use it within "menuItems":

<param name="menuItems" value=" {Home~http://www.withoutbook.com/index.php} {Features, Setup~http://www.globalguideline.com/} ">

Это полезно? Добавить комментарий Посмотреть комментарии
 

Самое полезное по оценкам пользователей:

Авторские права © 2026, WithoutBook.