what is thread in Hindi?

Hello दोस्तों! आज मैं आपको इस पोस्ट में what is thread in Hindi के बारें में बताऊंगा, और इसके example को भी पढेंगे, तो चलिए शुरू करते हैं:-

thread in Hindi

the smallest unit of program is called a thread.

Multi threading का अर्थ है कि एक cost effective तरीके से एक बेहतर program का निर्माण किया जाये जिसमें की program से टूटा प्रत्येक thread का एक निश्चित कार्य करने में सक्षम हो

Java में thread बनाने के लिए दो तरीके हैं।

1. एक thread class बनायी जाये तथा Run() को override किया जाये।

2. एक class define की जाये जो कि runnable interface को implement करे।

Class A ()

Extend thread

Public void run()

{

For(i=1;k3;i++)

{

System.out.println(i);

}

Class B()

Extend thread

Public void run()

{

For(j=1;k3;j++)

{

System.out.println(j);

}

Class C

{

public static void main( strong args[])

{

NewA.start();

NewB.start();

}

}

}

 

निवेदन:- अगर आपके लिए यह आर्टिकल useful रहा हो तो इसे अपने दोस्तों और classmates के साथ अवश्य share कीजिये,  या अन्य विषयों से related कोई question हो तो नीचे कमेंट के द्वारा बताइए. thanks.

5 thoughts on “what is thread in Hindi?”

    • एक साथ एक या एक से ज्यादा threads या sub-programs को run किया जाना Multithreading कहलता है।

      सोचिये यहाँ सब mobile पर बात करते हुए खाना खा सकते है। और साथ ही TV भी देख सकते है। हमारा दिमाग इस तरह बना हुआ है। की हम एक साथ कई काम कर सकते है। इसे हम multitasking भी कह सकते है। इसी तरह जावा का कोई भी program task complete कर सकता है। Java के इस feature को multi-threading कहते है।

      उदाहरण के लिए जब आपका program user input के लिए wait कर रहा है तो इस समय में वह दूसरा कोई काम complete कर सकता है। जैसे की database से connectivity की जा सकती है। या फिर कई काम हो सकते है इस दौरान।

      एक multi-threading program के 2 या 2 से अधिक thread होते है। ये thread एक साथ execute किये जा सकते है। हर thread एक unique task complete करने के लिए responsible होती है। ये सभी threads main thread में होती है। आपके program की main थ्रेड main() method के साथ शुरू होती है।

      निवेदन:- अगर आपके लिए यह useful रहा हो तो इसे अपने दोस्तों और classmates के साथ अवश्य share कीजिये,

      अन्य विषयों से related कोई question हो तो नीचे कमेंट के द्वारा बताइए. thanks.
      मैं पूरी कोशिश करूंगा कि आपके Questions के Answer आपको मिल सके…

      Reply
  1. sir kya nodejs multithreading he agar nhi he to wo synchronous tarike se do kamo ko ek sath to kar sakti hena sir explain thread in nodejs

    Reply

Leave a Comment