Difference between revisions of "Java/C2/First-Java-Program/Gujarati"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 232: Line 232:
 
|-
 
|-
 
|  05:41
 
|  05:41
|We do not need java compiler as well.
+
|આપણને જાવા કમ્પાઇલરની પણ જરૂર નથી.
  
 
|-
 
|-
 
|  05:45
 
|  05:45
|Hence, java is rightly described as “write once, run anywhere.”
+
|તેથી, જાવા બરાબર કહે છે કે,   “એક વાર લખો, ગમે ત્યાં રન કરો.”  
 
+
+
  
 
|-
 
|-
 
|  05:51
 
|  05:51
| So  After successful compilation, run the program using the command,  
+
| તેથી સફળ કમ્પાઇલેશન બાદ, આ આદેશની મદદથી પ્રોગ્રામ રન કરો.
  
 
|-
 
|-
 
|  05:56
 
|  05:56
|'''''java '''''(no c) space '''''HelloWorld '''''(no dot java) extension and hit '''Enter'''.
+
|'''''java '''''(c વગર) સ્પેસ '''''HelloWorld '''''(dot java એક્સ્ટેશન વગર) અને '''Enter''' ડબાઓ.
  
 
|-
 
|-
 
| 06:07
 
| 06:07
| You  will get  the output '''My first java program!'''
+
| તમને '''My first java program!''' આઉટપુટ મળશે.
  
 
|-
 
|-
 
|  06:13
 
|  06:13
|So we have written our first java program.Let us go back to '''editor'''
+
|તો આપણે આપણો પ્રથમ જવા પ્રોગ્રામ લખ્યો. ચાલો '''editor''' પર પાછા જાઓ.
 
+
 
   
 
   
 
|-
 
|-
 
|  06:22
 
|  06:22
Now, remove the '''''semi-colon '''''which is at the end of the statement.
+
હવે, અર્ધવિરામ રદ કરો, જે સ્ટેટમેન્ટના અંતે છે.
  
 
|-
 
|-
 
|  06:27
 
|  06:27
|   Click on    '''Save''' icon.
+
| '''Save''' આઇકોન ઉપર ક્લિક કરો.
  
 
|-
 
|-
 
|  06:29
 
|  06:29
Let us go back to the '''Terminal'''.
+
ચાલો '''Terminal''' ટર્મિનલ ઉપર પાછા જઈએ.
  
 
|-
 
|-
 
|  06:33
 
|  06:33
| Run the command '''''javac ''' ''' HelloWorld '''dot''' java'''''.  
+
| આ આદેશ રન કરો, '''''javac ''' ''' HelloWorld '''dot''' java'''''.  
  
 
|-
 
|-
 
| 06:41
 
| 06:41
| The compiler gives an error.
+
| કમ્પાઈલર એક ભૂલ આપે છે.
  
 
|-
 
|-
 
|  06:44
 
|  06:44
|It says, a semi colon is expected on the fifth line.
+
|તે કહે છે, પાંચમી લાઈન ઉપર અર્ધવિરામ જરૂરી છે.
  
  
 
|-
 
|-
 
|  06:52
 
|  06:52
|The up arrow points to the error statement.
+
|અપ એરો એરર સ્ટેટમેન્ટને નિર્દેશ કરે છે.
  
 
|-
 
|-
 
|  06:57
 
|  06:57
Let us go back to the ''' Editor'''.
+
ચાલો '''Editor''' ઉપર પાછા જઈએ.
  
 
|-
 
|-
 
|  07:01
 
|  07:01
|In Java, all statements are terminated with semicolons.  
+
|જાવામાં, બધા સ્ટેટમેન્ટ અર્ધવિરામ સાથે સમાપ્ત થાય છે.
  
 
|-
 
|-
 
|    07:06
 
|    07:06
| So go to the fifth line and add a semicolon.
+
| તેથી પાંચમી લીટી પર જાઓ અને અર્ધવિરામ ઉમેરો.
 
+
+
  
 
|-
 
|-
 
| 07:13
 
| 07:13
Click on the '''Save '''icon. It is necessary to save the file before compiling
+
|  '''Save ''' આઇકોન ઉપર ક્લિક કરો. કમ્પાઈલ કરવા પહેલાં ફાઈલ સંગ્રહવું જરૂરી છે
  
 
|-
 
|-
 
|  07:22
 
|  07:22
| Let us go back to the '''Terminal'''.
+
| ચાલો '''Editor''' ઉપર પાછા જઈએ.
  
 
|-
 
|-
 
|  07:25
 
|  07:25
|Compile the file using  '''''javac '''Space''' HelloWorld '''dot''' java'''''.  
+
|આ આદેશ દ્વારા ફાઈલ કમ્પાઈલ કરો, '''''javac''' સ્પેસ '''HelloWorld '''dot''' java'''''.  
  
 
|-
 
|-
 
|  07:32
 
|  07:32
|   The file is successfully compiled as we see no errors.
+
| આપણે જોશું કોઈ પણ એરર નથી, ફાઇલ સફળતાપૂર્વક કમ્પાઈલ થયેલ છે.
  
 
|-
 
|-
 
|  07:36
 
|  07:36
|Now, run the program using the command '''''java'''''  '''''HelloWorld''''' and  .
+
|આ આદેશ દ્વારા પ્રોગ્રામ રન કરો '''''java'''''  '''''HelloWorld''''' અને .
  
 
   
 
   
 
|-
 
|-
 
| 07:45  
 
| 07:45  
| We see the output '''My first java program!'''
+
| આપણને આ આઉટપુટ મળશે, '''My first java program!'''
  
 
|-
 
|-
 
|  07:49
 
|  07:49
|This is how you handle errors in java.
+
|આ રીતે તમે જાવામાં એરર નિયંત્રિત કરી શકો છો.
  
 
|-
 
|-
 
|  07:54
 
|  07:54
|As the series progresses, we will learn more about the errors.
+
|જેમ શ્રેણી વધશે, આપણે વધુ એરર વિશે જાણીશું.
  
 
|-
 
|-
 
|  08:02
 
|  08:02
We now see what are the naming conventions in java.
+
હવે આપણે જાવામાં નેમીંગ કન્વેન્શન વિષે શીખીશું.
  
 
|-
 
|-
 
|  08:06
 
|  08:06
|*  class name should be in CamelCase.
+
|*  ક્લાસ નામ કેમલકેસ માં હોવું જોઈએ.
 
|-
 
|-
 
|  08:10
 
|  08:10
|* Which means each new word begins with an upper case.
+
|* જેનો અર્થ છે, દરેક નવો શબ્દ મોટા અક્ષરથી શરૂ થતો હોવો જોઈએ.
 
|-
 
|-
 
|  08:14
 
|  08:14
|* Example: class HelloWorld, class ChessGame.
+
|* ઉદાહરણ તરીકે: class HelloWorld, class ChessGame.
  
 
|-
 
|-
 
|  08:19
 
|  08:19
|So,''' H''' of hello and  '''W''' of World are in uppercase.
+
|તેથી, hello નો '''H''' અને World નો '''W''' મોટા અક્ષરમાં હોવો જોઈએ.
 
+
  
 
|-
 
|-
Line 368: Line 362:
 
|  08:44
 
|  08:44
 
|Also the method name should be a verb.
 
|Also the method name should be a verb.
 
 
  
 
|-
 
|-

Revision as of 15:41, 17 July 2013

Time' Narration
00:02 First java program પરના આ સ્પોકન ટ્યુટોરીયલમાં તમારું સ્વાગત છે.
00:09 આ ટ્યુટોરીયલ માં આપણે શીખીશું,
00:11 સિમ્પલ જાવા પ્રોગ્રામ બનાવવું,
00:14 પ્રોગ્રામ કમ્પાઈલ કરવું,
00:16 પ્રોગ્રામ રન કરવું અને
00:19 જાવામાં અનુસરવામાં આવતા નેમીંગ કન્વેન્શનો વિષે
00:24 અહીં આપણે ઉબુન્ટુ આવૃત્તિ 11.10 અને જાવા ડેવલપમેન્ટ એન્વાયર્નમેન્ટ jdk 1.6 નો ઉપયોગ કરી રહ્યા છીએ.
00:32 આ ટ્યુટોરીયલ અનુસરવા માટે JDK 1.6 તમારી સિસ્ટમ પર સંસ્થાપિત હોવું જોઈએ.
00:39 જો નહિં, તો સંબંધિત ટ્યુટોરીયલ માટે નીચે બતાવેલ અમારી વેબસાઇટ જુઓ.
00:46 હવે ચાલો આપણો પ્રથમ જાવા પ્રોગ્રામ લખીએ.
00:51 તે માટે તમને Terminal અને Text Editor ની જરૂર છે.
00:56 હું Text Editor તરીકે gedit નો ઉપયોગ કરી રહ્યી છું.
01:01 Text editor માં, આપણે પ્રથમ HelloWorld ક્લાસ બનાવીશું.
01:06 તો ટાઇપ કરો, class HelloWorld. HelloWorld એ ક્લાસનું નામ છે.
01:17 કર્લી કૌંસ ખોલો. Enter ડબાઓ અને કર્લી કૌંસ બંધ કરો.
01:24 આ બે કર્લી કૌંસ વચ્ચેનો કોડ HelloWorld ક્લાસનો છે.
01:33 હવે ટોચ પર Save ચિહ્ન પર ક્લિક કરી ફાઇલ સેવ કરો
01:37 ફાઈલ વારંવાર સંગ્રહ્વી સારી વાત છે.
01:43 તો Save As સંવાદ બોક્સ દેખાય છે.
01:46 તમે જ્યાં ફાઈલ સંગ્રહવા ઈચ્છો છો તે સ્થાન બ્રાઉઝ કરો.
01:51 અહીં, Home ડિરેક્ટરીમાં હું ફોલ્ડર બનાવીશ.
01:57 ચાલો તેને Demo નામ આપીએ , Enter ડબાઓ.
02:02 પછી આ ફોલ્ડર અંદર આપણે ફાઇલ સંગ્રહ કરીશું.
02:08 Name ટેક્સ્ટ બોક્સમાં, ક્લાસનું નામ લખો.
02:13 જાવામાં, ક્લાસનું નામ અને ફાઈલનું નામ સમાન હોવું જોઈએ.
02:20 યાદ કરો આપણે HelloWorld ક્લાસ બનાવ્યો હતો.
02:25 તો આપણે ફાઈલ HelloWorld dot java તરીકે સંગ્રહીશું.
02:33 Dot java જાવા ફાઇલને આપેલ ફાઈલ એક્સટેન્સન છે.
02:39 પછી Save બટન પર ક્લિક કરો. ફાઈલ હવે સંગ્રહાય છે.
02:47 ક્લાસ અંદર, આપણે main મેથડ લખીશું.


02:53 તો ટાઇપ કરો
02:54 public static void main કૌંસ, કૌંસ અંદર String arg ચોરસ કૌંસ


03:10 Main ફન્કશન પ્રોગ્રામનું શરૂઆત બિંદુ ચિહ્નિત કરે છે.


03:15 આપણે ભવિષ્યના ટ્યુટોરીયલ માં public, static, void અને String arg માટે જોઈશું.
03:23 પછી ફરીથી, કર્લી કૌંસ ખોલો.
03:27 Enter ડબાઓ અને કર્લી કૌંસ બંધ કરો.
03:32 આ બે કર્લી કૌંસ વચ્ચેનો કોડ main મેથડનો છે.
03:41 હવે આપણે Terminal પર રેખા દર્શાવવા માટેનો કોડ લખીશું.


03:46 તો main મેથડ અંદર ટાઇપ કરો, System dot out dot println કૌંશ, અર્ધવિરામ.


03:59 આ લાઈન પ્રિન્ટ કરવા માટે ઉપયોગી સ્ટેટમેન્ટ છે. અર્ધવિરામ લીટીને સમાપ્ત કરવા માટે વપરાય છે.


04:10 હવે ચાલો જાવા ને શું પ્રિન્ટ કરવું તે કહીએ.


04:13 તો કૌંશ અંદર, ડબલ અવતરણ ચિહ્ન અંદર ટાઇપ કરો, My first java program ઉદગાર ચિહ્ન.
04:30 Save આઇકોન પર ક્લિક કરી ફાઈલ સેવ કરો.
04:36 Terminal ઉપર જાઓ.
04:38 ખાતરી કરો કે તમે તે ડિરેક્ટરીમાં છે જ્યાં HelloWorld.java સેવ થયેલ છે.


04:46 યાદ રાખો હું મારી હોમ ડિરેક્ટરીમાં છું.


04:50 તો ટાઇપ કરો cd સ્પેસ Demo અને Enter ડબાઓ.


04:59 આપણે જોશું HelloWorld.java Demo ફોલ્ડરમાં હાજર છે.
05:06 ચાલો આ ફાઈલ કમ્પાઈલ કરીએ. ટાઇપ કરો, javac સ્પેસ HelloWorld dot java અને Enter ડબાઓ.
05:21 આ આપણે બનાવેલ ફાઈલ કમ્પાઈલ કરે છે.
05:25 આપણે જોશું કે ફાઈલ કમ્પાઈલ થયેલ છે અને કોઈ પણ એરર નથી.
05:30 આપણે જોશું HelloWorld.class ફાઇલ બનેલ છે.
05:36 આ ફાઇલ ગમે ત્યાં રન થઇ શકે છે.
05:38 એટલે કે કોઈપણ ઓપરેટિંગ સિસ્ટમ પર.
05:41 આપણને જાવા કમ્પાઇલરની પણ જરૂર નથી.
05:45 તેથી, જાવા બરાબર કહે છે કે, “એક વાર લખો, ગમે ત્યાં રન કરો.”
05:51 તેથી સફળ કમ્પાઇલેશન બાદ, આ આદેશની મદદથી પ્રોગ્રામ રન કરો.
05:56 java (c વગર) સ્પેસ HelloWorld (dot java એક્સ્ટેશન વગર) અને Enter ડબાઓ.
06:07 તમને My first java program! આઉટપુટ મળશે.
06:13 તો આપણે આપણો પ્રથમ જવા પ્રોગ્રામ લખ્યો. ચાલો editor પર પાછા જાઓ.
06:22 હવે, અર્ધવિરામ રદ કરો, જે સ્ટેટમેન્ટના અંતે છે.
06:27 Save આઇકોન ઉપર ક્લિક કરો.
06:29 ચાલો Terminal ટર્મિનલ ઉપર પાછા જઈએ.
06:33 આ આદેશ રન કરો, javac HelloWorld dot java.
06:41 કમ્પાઈલર એક ભૂલ આપે છે.
06:44 તે કહે છે, પાંચમી લાઈન ઉપર અર્ધવિરામ જરૂરી છે.


06:52 અપ એરો એરર સ્ટેટમેન્ટને નિર્દેશ કરે છે.
06:57 ચાલો Editor ઉપર પાછા જઈએ.
07:01 જાવામાં, બધા સ્ટેટમેન્ટ અર્ધવિરામ સાથે સમાપ્ત થાય છે.
07:06 તેથી પાંચમી લીટી પર જાઓ અને અર્ધવિરામ ઉમેરો.
07:13 Save આઇકોન ઉપર ક્લિક કરો. કમ્પાઈલ કરવા પહેલાં ફાઈલ સંગ્રહવું જરૂરી છે
07:22 ચાલો Editor ઉપર પાછા જઈએ.
07:25 આ આદેશ દ્વારા ફાઈલ કમ્પાઈલ કરો, javac સ્પેસ HelloWorld dot java.
07:32 આપણે જોશું કોઈ પણ એરર નથી, ફાઇલ સફળતાપૂર્વક કમ્પાઈલ થયેલ છે.
07:36 આ આદેશ દ્વારા પ્રોગ્રામ રન કરો java HelloWorld અને .


07:45 આપણને આ આઉટપુટ મળશે, My first java program!
07:49 આ રીતે તમે જાવામાં એરર નિયંત્રિત કરી શકો છો.
07:54 જેમ શ્રેણી વધશે, આપણે વધુ એરર વિશે જાણીશું.
08:02 હવે આપણે જાવામાં નેમીંગ કન્વેન્શન વિષે શીખીશું.
08:06 * ક્લાસ નામ કેમલકેસ માં હોવું જોઈએ.
08:10 * જેનો અર્થ છે, દરેક નવો શબ્દ મોટા અક્ષરથી શરૂ થતો હોવો જોઈએ.
08:14 * ઉદાહરણ તરીકે: class HelloWorld, class ChessGame.
08:19 તેથી, hello નો H અને World નો W મોટા અક્ષરમાં હોવો જોઈએ.
08:25 Similarly C and G of Chess and Game respectively are in uppercase.
08:31 The method name should be the mixed case.
08:35 Which means that the first word should begin with a lower case.
08:39 And all new words followed should begin with an upper case.
08:44 Also the method name should be a verb.
08:48 For Example: showString(), main(), goToHelp(). Here s of show is in lowercase while S of string is in uppercase .The variable name should not begin with digits .
09:06 We cannot use keywords for our class, method or variable name.
09:13 For example: cannot use keywords like public, private, void, static and many more.


09:22 So in this tutorial, we have learnt to write, compile and run a simple java program.
09:30 We also saw the naming conventions followed in java.
09:35 For self assessment write a simple java program to prints Java file name and class name should be same.


09:47 To know more about the Spoken Tutorial Project
09:50 Watch the video available at http://spoken-tutorial.org/What_is_a_Spoken_Tutorial
09:58 It summarises the Spoken Tutorial project
10:02 If you do not have good bandwidth, you can download and watch it
10:08 The Spoken Tutorial Project Team
10:10 Conducts workshops using spoken tutorials
10:13 Gives certificates for those who pass an online test
10:17 For more details, please write to contact@spoken-tutorial.org


10:25 Spoken Tutorial Project is a part of the Talk to a Teacher project
10:30 It is supported by the National Mission on Education through ICT, MHRD, Government of India
10:38 More information on this Mission is available at
http://spoken-tutorial.org/NMEICT-Intro 


10:49 We have come to the end of this tutorial.
10:51 Thanks for joining.
10:53 This is Prathamesh Salunke signing off. Jai Hind.

Contributors and Content Editors

Krupali, Pratik kamble