Applet life cycle with example in hindi

आज हम Java के इस  tutorial में applet life cycle with example in hindi , types of applet in java in hindi, what is applet in java in hindi? और applet program in java in hindi के बारे में पढेंगे. तो चलिये शुरू करते. hello दोस्तों Hindi me iT में आपका बहुत – बहुत अभिनन्दन है.

what is applet in java in hindi? – जावा में एप्लेट क्या है हिंदी में?

Applets एक Java Program होता है client site यानी user के  ब्राउज़र(browser) में रन होता है.  ये एक ऐसा java program है जो html (hypertext markup language) के साथ run होता हैं.  इसे run करने के लिए website की html में  ही include कर लिया जाता है. और user site पर run होती हैं.

Applets program जब run होता हैं तो इसकी 5 stage होती हैं. जो इस प्रकार हैं.

life cycle of applet in hind

1.-  init(): – Applets program को जब बनाते हैं. तो इसे बनाते समय हमेशा init() method के साथ बनाया जाता हैं. जब run होता हैं. तो ये आपनी life cycle में एक बार ही initialize होता हैं.

syntax:-

Public void init() {
   //code
}

जब इस program को html के साथ जोड़ते हैं. तो दोनों file अलग-अलग होती हैं. html file में applet program का use करने के लिए इसे <applet> tag के साथ use किया जाता हैं.

ये program java की applet class नामक class को extend करके create किया जाता हैं.

applet ऐसा java program होता है जो applet class को extend करता है और applet program को .class एक्सटेंशन(extension) से save किया जाता है जव कोई यूजर browser में applet को देखता है तो applet का code यूजर की मशीन(machine) में डाउनलोड(download) हो जाता है

2.- start():– जब इस program को run किया जाता हैं. तब सबसे पहले start() method को कॉल किया जाता हैं. ये method automatically कॉल होता हैं.

syntax:-

Public void stop() {
    //code
}

इस program को run करने के लिए आपकी machine में JVM(java virtual machine) होना चहिये. जब start() method को कॉल किया जाता हैं. तो ये applet java program आपकी machine में download होता हैं.

3. – stop() :- applet java program को stop करना होता था. तो इसे करने के लिए stop() method को किया जाता हैं. ये method तब run होता हैं जब user इस page को छोड़कर दुसरे page या windows पर जाता हैं.

syntax:-

Public void stop() {
    //code
}

4. – destroy():- इस method का use तब किया जाता हैं. जब applet java program को machine की memory से remove या delete करना हो. ये method user की machine में एन बार run होता हैं.

syntax:-

Public void destroy() {
    //code
}

5.- paint():-  इस method का use applet java program ये paint() method user की machine पर कई बार run होता हैं. इसे start() method के बाद run किया जाता हैं.

syntax:-

Public void paint() {
   //code
}

Applet life cycle with example in hindi

applet life cycle with example in hindi

html file

<html>
<head>
<title>applet life cycle with example in hindi </title>
</head>
<applet code=”exmple.class” >
</applet>
<html>

java file

Difference between JDK JRE and JVM in hindi

import java.awt.*;
import java.applet.Applet;

Class exmple extends applet
{
     Public void int()
     {
      void setbackground(color.red);
      }
      public void paint(graphics g)
            {
             g.drowString(“applet are for GUI”30,30);
             }
}

types of applet in java in hindi – जावा में applet के प्रकार हिंदी में

किसी web page में दो प्रकार के applet program होते हैं.

  1. Local applet
  2. Remote applet

Local applet in hindi

local applet जो होते हैं वे locally store और developed किये जाते हैं. इसे use करने के लिए internet की आवश्यकता नहीं होती हैं. क्योकि इसे locally आपनी machine में ही store किया जाता हैं.

What is JVM in hindi | JVM क्या हैं. Why use  JVM in hindi | Features of JVM

Remote applets in hindi

Remote applets को ये locally आपकी machine में store नहीं होते हैं. इसे एक्सेस करने के लिए internet की आवश्यकता होती हैं. Remote applets को किसी अन्य डेवलपर्स के व्दारा develop किया जाता हैं. इसे आपनी machine में  load करने के लिए आपको नेटवर्क address  यानी Uniform Resource Locator (URL) कि जरूरत होती हैं.

reference-https://www.javatpoint.com/java-applet

आशा  करता हूँ applet life cycle with example in hindi , types of applet in java, what is applet in java in hindi? और applet program in java in hindi आपको समझ में आ गया होगा.

अगर आपको इससे related कोई question पूछना हैं तो आप comment करके पूछ सकते है . हम आपकी comment का जबाब जरुर देंगे. अगर हमारे द्वारा दी गयी जानकारी अच्छी लगी हो तो हमे comment करके जरुर बताये और आपका हमको कोई सुझाब हो तो उसे भी जरुर बताये . दोस्तों आपसे एक request हैं. आप इस जानकारी को आपने दोस्तों , रेस्तेदारो के साथ जरुर शेयर करे | धन्यबाद

Related Posts

Leave a Comment