marq

Dr. Charles Simonyi is the Father of Modern Microsoft Excel                                           JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha, later LiveScript, and finally renamed to JavaScript.                                           The word "Biology" is firstly used by Lamarck and Treviranus                                           Hippocrates (460-370 bc) is known as father of medicine.                                           Galene, 130-200 is known as father of Experimental Physology                                           Aristotle (384-322 BC) is known as Father of Zoology because he wrote the construction and behavior of different animals in his book "Historia animalium"                                           Theophrastus(370-285 BC) is known as father of Botany because he wrote about 500 different plants in his book "Historia Plantarum".                                           John Resig is known as Father of Jquery -                                          HTML is a markup language which is use to design web pages. It was invented in 1990 by Tim Berners-Lee.                                                                The Google was founded by Larry Page and Sergey Brin.                                                                Rasmus Lerdorf was the original creator of PHP. It was first released in 1995.                                                               Facebook was founded by Mark Zuckerberg                                                               Bjarne Stroustrup, creator of C++.                                                                Dennis Ritchie creator of C                                                                                                                              James Gosling, also known as the "Father of Java"                                          At 11.44%, Bihar is India's fastest growing state                                          Father of HTML -Tim Berners Lee                                          orkut was created by Orkut Büyükkökten, a Turkish software engineer                    Photoshop: It came about after Thomas Knoll, a PhD student at the University of Michigan created a program to display grayscale images on a monochrome monitor which at the time was called 'Display'.

Java Program Structure - Java in Hindi



Structure of Java Programs

किसी जावा के Program में हम आवश्‍यकतानुसार एक से अधिक Classes को Define कर सकते हैं। लेकिन फिर भी हम एक Program में किसी एक Class में ही main() Method को Define कर सकते हैं। विभिन्न Classes में विभिन्न प्रकार के Data और उन Data पर Perform होने वाले Operations को Define किया जाता है। जावा का Program बनाने के लिए हम सबसे पहले विभिन्न प्रकार की Classes बनाते हैं और फिर उन सभी Classes को Combine कर लेते हैं। एक जावा Program के विभिन्न विभागों को हम निम्नानुसार दर्शा सकते हैं:

Documentation Section
Package Statements
Import Statements
Interface Statements
Class Definitions
{
      Data Members
      Methods
      Main Method Class
      {
            Main Method Definitions
      }
}

Documentation Section

किसी भी Program के इस Section में हमें Program से सम्बंधित Descriptions देने होते हैं। जैसे कि Author का नाम, Program Creation की Date, Program Create करने का कारण, Program की उपयोगिता आदि से सम्बंधित बातें हमें Comment के रूप में Documentation Section में लिखनी होती हैं। हालांकि ये एक Optional Section है, फिर भी Program को Readable बनाने के लिए हमें हर Program को Well Documented करना चाहिए। यहां हमें ये बताना चाहिए कि हमने Program में किन Classes को Use किया है और किस कारण से Use किया है। साथ ही Program के Algorithm यानी Flow को भी सारांश रूप में Describe करने की कोशिश करनी चाहिए। सामान्यतया Documentation को /** . . . */ Format में लिखना चाहिए। इस तरह से Comment करने पर हम Documentation की एक File JDK Tools के उपयोग द्वारा Generate कर सकते हैं।


Package Statements

Package Statement किसी भी जावा Program का पहला Statement होता है। ये Statement एक Package का नाम Declare करता है और जावा Program को बताता है कि Program में Use होने वाली Classes इन Packages में Defined की गई हैं। किसी Package को हम निम्नानुसार जावा के Source Program में Use कर सकते हैं :

package StudentInformation;

ये Statement StudentInformation नाम के Package को उस Program या Source File में Include कर लेगा, जिसमें ये Statement लिखा गया होगा।


Import Statements

किसी Package Statement के बाद जो अगला Statement हो सकता है वह import Statements होता है। पहले से बनी हुई किसी Class को जावा के Source Program में Include करने के लिए हमें जावा के import Keyword के साथ उस Class का नाम लिखना होता है, जिसे अपने Program में Use करना होता है। ये काम हम निम्नानुसार Statement द्वारा कर सकते हैं :

import StudentInformation.testMarks;

ये Statement जावा Interpreter को testMarks नाम की Class को Source File में Include करने का Message देता है, जो कि StudentInformation नाम के Package में उपलब्ध है और इस package का एक हिस्सा है।


Interface Statements

Interface एक Class के समान ही होता है लेकिन इसमें Methods के Declarations का एक Group होता है। ये भी एक Optional Statement है और इसका प्रयोग हम तभी करते हैं जब हमें अपने Program में Multiple Inheritance की सुविधा प्राप्त करनी होती है। इस विषय में हम आगे विस्तार से पढेंगे।


Main Method Class

जावा के हर Application Program में हमें एक Main() Method की जरूरत होती है, जिसको जावा Compiler सबसे पहले Execute करता है। ये किसी भी जावा Application Program का एक बहुत ही जरूरी हिस्सा है। किसी Simple जावा Program में केवल ये एक Method भी हो सकता है। Main Method विभिन्न प्रकार की Classes के Objects Create करता है और उनके बीच में Communication को Establish करता है। Main Method के अन्त में पहुंचने पर Program Terminate हो जाता है और Program Control पुनः Operating System को Transfer हो जाता है।

No comments:

Post a Comment