Difference between revisions of "Java/C2/User-Input/Gujarati"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with ' {| border=1 || ''Time''' || '''Narration''' |- | 00:02 | Welcome to the spoken-tutorial on '''Taking user input''' in '''Java''' '''using BufferedReader''' . |- | 00:09 | …')
 
Line 6: Line 6:
 
|-
 
|-
 
|  00:02
 
|  00:02
| Welcome to the spoken-tutorial on '''Taking user input''' in '''Java''' '''using BufferedReader''' .
+
| '''BufferedReader''' ની મદદથી યુઝર ઈનપુટ લેવા પરનાં સ્પોકન ટ્યુટોરીયલમાં સ્વાગત છે.
  
 
|-
 
|-
 
|  00:09
 
|  00:09
| In this tutorial we will learn:
+
| આ ટ્યુટોરીયલમાં આપણે શીખીશું:
  
 
|-
 
|-
 
|  00:11
 
|  00:11
| To take user input in Java
+
| જાવામાં યુઝર ઈનપુટ લેવાનું
 +
 
 
|-
 
|-
 
|  00:13
 
|  00:13
| About InputStreamReader and BufferedReader
+
| '''InputStreamReader''' અને '''BufferedReader''' વિશે
  
  
Line 23: Line 24:
 
|-
 
|-
 
| 00:17
 
| 00:17
To follow this tutorial you must know:
+
આ ટ્યુટોરીયલનાં અનુસરણ માટે તમને જાણ હોવી જોઈએ કે:
  
 
|-
 
|-
 
|  00:19
 
|  00:19
|how to write, compile and run a simple java program in '''Eclipse'''
+
|''એક્લીપ્સ''' માં સાદું જાવા પ્રોગ્રામ કેવી રીતે લખવું, કમ્પાઈલ કરવું અને રન કરવું 
 +
 
 
|-
 
|-
 
|  00:24
 
|  00:24
| You must also know  about the '''datatypes''' in '''Java'''
+
| તમને જાવામાનાં '''ડેટા ટાઈપ''' વિશે પણ માહિતી હોવી જરૂરી છે
 +
 
 
|-
 
|-
 
|  00:27
 
|  00:27
| If not, please refer to the '''spoken tutorial''' on these topics available at '''spoken''' ''hyphen'' '''tutorial''' ''dot'' '''org.'''
+
| જો નથી, તો '''spoken hyphen tutorial dot org''' પર ઉપલબ્ધ આ વિષયો પરનાં સ્પોકન ટ્યુટોરીયલોનો સંદર્ભ લો..
  
  
Line 39: Line 42:
 
|-
 
|-
 
|  00:35
 
|  00:35
Here, I am using,
+
અહીં, હું વાપરી રહ્યી છું,
  
'''Ubuntu v 11.10'''
+
  '''ઉબુન્ટુ આવૃત્તિ ૧૧.૧૦'''
  
'''JDK 1.6''' and
+
'''જેડીકે ૧.''' અને
  
'''Eclipse IDE   3.7.0'''
+
'''એક્લીપ્સ IDE ..'''
  
 
|-
 
|-
 
|  00:44
 
|  00:44
|   Now, we will learn what a '''BufferedReader '''is!
+
| હવે, આપણે શીખીશું કે '''BufferedReader''' શું છે!  
  
 
|-
 
|-
 
|  00:48
 
|  00:48
|It is a '''class''' which is used to read text from an input stream.
+
|આ એક ક્લાસ છે જેનો ઉપયોગ ઈનપુટ સ્ટ્રીમમાંથી ટેક્સ્ટ વાંચવા માટે થાય છે.  
  
 
|-
 
|-
 
|  00:53
 
|  00:53
|It provides efficient way to read array of characters and lines.
+
|અક્ષરોનાં અને લાઈનનાં એરેને વાંચવા માટે આ એક અસરકારક માર્ગ પૂરું પાડે છે.
  
  
 
|-
 
|-
 
|00:59
 
|00:59
| To make use of ''BufferedReader ''' , we need to import three '''classes''' from the''' java '''''dot''''' io package.'''
+
| '''BufferedReader''' ને ઉપયોગમાં લેવા માટે, આપણને '''java dot io પેકેજ''' માંથી ત્રણ ક્લાસોને આયાત કરવાની જરૂર છે.    
  
 
|-
 
|-
 
|  01:05
 
|  01:05
|These three '''classes''' are:
+
|આ ત્રણ ક્લાસો છે:
  
 
* '''IOException'''
 
* '''IOException'''
* '''InputStreamReader''' and
+
* '''InputStreamReader''' અને
 
* '''BufferedReader'''
 
* '''BufferedReader'''
  
 
|-
 
|-
 
|  01:12
 
|  01:12
|We will learn about''' packages''' and how to import '''classes''' in the coming tutorials.
+
|આપણે '''પેકેજો''' વિશે અને '''ક્લાસો''' ને કેવી રીતે આયાત કરવું એ વિશે આવનારા ટ્યુટોરીયલોમાં શીખીશું.
  
 
|-
 
|-
 
| 01:18
 
| 01:18
| Now how is the input taken?  
+
| હવે ઈનપુટને કેવી રીતે લેવાય છે?  
  
 
|-
 
|-
 
| 01:21
 
| 01:21
| All the input that we take from the user will be in the form of '''String'''.
+
| એ બધાજ ઈનપુટ જે આપણે વપરાશકર્તાથી લઈએ છીએ તે બધા સ્ટ્રીંગ સ્વરૂપમાં રહેશે.  
  
 
|-
 
|-
 
|  01:26
 
|  01:26
|It has to be then typecasted or converted to the particular datatype.
+
|તે બધાને ત્યાર પછીથી ટાઇપકાસ્ટ અથવા કે અમુક ચોક્કસ ડેટા પ્રકારમાં બદલી કરવું પડે છે.  
  
 
|-
 
|-
 
|  01:31
 
|  01:31
|We will see that while we write our program to take the user input.  
+
|આપણે તેને ત્યારે જોઈશું જયારે આપણે યુઝર ઈનપુટ લેવા માટે આપણું પ્રોગ્રામ લખીશું.  
  
 
|-
 
|-
 
| 01:35
 
| 01:35
|   Now, let us see the syntax to implement '''BufferedReader'''.
+
| હવે, ચાલો આપણે '''BufferedReader''' ને અમલમાં લેવા માટેની વાક્યરચનાઓને જોઈએ
  
 
|-
 
|-
 
|  01:39
 
|  01:39
|Once you import the three '''classes,''' you need to create an object of '''InputStreamReader'''.
+
|જેમ તમે ત્રણ ક્લાસોને આયાત કરશો, તમને '''InputStreamReader''' નું ઓબ્જેક્ટને બનાવવાની જરૂર છે.  
  
 
|-
 
|-
 
|  01:45
 
|  01:45
|You also need to create an '''object''' of ''' BufferedReasder'''.
+
|એ સાથે જ તમને '''BufferedReasder''' નું '''ઓબ્જેક્ટ''' પણ બનાવવાની જરૂર છે.
  
 
|-
 
|-
 
|  01:49
 
|  01:49
|We will learn about this in detail, when we write our program.
+
|આપણે આ વિશે વિગતમાં જાણીશું, જયારે આપણે આપણું પ્રોગ્રામ લખીશું.
  
 
|-
 
|-
 
|  01:54
 
|  01:54
|   So, let us switch to '''Eclipse'''.
+
| તો, ચાલો '''એક્લીપ્સ''' પર જઈએ.  
  
 
|-
 
|-
 
|  01:56
 
|  01:56
|I have already opened a '''class''' named '''InputBufferedReader'''.
+
|મેં પહેલાથી જ '''InputBufferedReader''' નામનો ક્લાસ ખોલ્યો છે.
  
 
|-
 
|-
 
| 02:00  
 
| 02:00  
|We will begin with importing the '''java.io package'''.
+
|'''java.io''' પેકેજને આયાત કરવાની સાથે આપણે શરૂઆત કરીશું.  
  
  
 
|-
 
|-
 
|  02:04
 
|  02:04
|So type, before the class '''import''' ''space'' '''java''' ''dot'' '''io '''''dot'' star semi colon.
+
|તો ટાઈપ કરો, '''import''' ક્લાસની પહેલા સ્પેસ '''java dot io dot star''' અર્ધવિરામ.  
  
 
|-
 
|-
 
|  02:14
 
|  02:14
|This will import the classes '''InputStreamReader, BufferedReader and IOException.'''
+
|આ આયાત કરશે '''InputStreamReader, BufferedReader અને IOException''' ક્લાસોને.
 
+
  
 
|-
 
|-
 
|  02:20
 
|  02:20
| Now  We will make use of '''BufferedReader '''inside the main method.
+
|આ આયાત કરશે '''InputStreamReader, BufferedReader અને IOException''' ક્લાસોને.  
  
 
|-
 
|-
 
|  02:25
 
|  02:25
|We need to throw an '''IOException''' in whatever method we use the '''BufferedReader'''.
+
|જે કંઈપણ મેથડ આપણે '''BufferedReader''' માં વાપરીએ છીએ તેમાં આપણને '''IOException''' નાખવાની જરૂર છે.
  
 
|-
 
|-
 
|  02:31
 
|  02:31
|So right after the main method type '''throws IOException.'''
+
|તેથી '''main''' મેથડની તુરંત બાદ ટાઈપ કરો '''throws IOException'''.
  
 
|-
 
|-
 
|  02:42
 
|  02:42
|Now, what does this mean?
+
|હવે, આનો શું અર્થ થાય છે?
  
 
|-
 
|-
 
|  02:45
 
|  02:45
|'''Exceptions '''are errors which occur in Java when some unexpected circumstances occur.
+
|'''Exceptions''' એ એરરો છે જે જાવામાં ત્યારે ઉદભવે છે જયારે અનપેક્ષિત સંજોગો બને છે.
  
 
|-
 
|-
 
|  02:52
 
|  02:52
|To prevent '''Exception errors '''we make use of '''throws '''keyword.
+
|'''Exceptions''' એરરોને અટકાવવા માટે આપણને '''throws''' કીવર્ડ વાપરવું પડે છે.  
 
   
 
   
 
|-
 
|-
 
|  02:57
 
|  02:57
|'''Throws '''is a keyword which is used during '''Exception handling. '''
+
|'''Throws''' એ એક કીવર્ડ છે જે '''Exception handling''' વેળાએ વપરાય છે.''
  
 
|-
 
|-
 
| 03:00  
 
| 03:00  
|It is used whenever we know that '''Exception error''' will definitely occur.
+
|આ ત્યારે વપરાય છે જયારે આપણે જાણીએ છીએ કે '''Exceptions''' એરરો ચોક્કસ ઉદભવશે.  
  
 
|-
 
|-
 
|  03:05
 
|  03:05
|When we use '''BufferedReader, exception error''' always take place.
+
|જયારે આપણે '''BufferedReader''' ને વાપરીએ છીએ, '''Exceptions''' એરરો હંમેશા આવે છે.
  
 
|-
 
|-
 
|  03:10
 
|  03:10
|To prevent '''Exception errors''' from taking place we make use of '''throws IOException.'''
+
|'''Exceptions''' એરરોને આવતા અટકાવવા આપણને '''throws IOException''' વાપરવાની જરૂર પડે છે.
  
 
|-
 
|-
 
|  03:16
 
|  03:16
|We will learn about '''Exception Handling''' in the coming tutorials.
+
|આપણે '''Exception Handling''' વિશે આવનારા ટ્યુટોરીયાલોમાં શીખીશું.  
  
 
|-
 
|-
 
|  03:20
 
|  03:20
| Now, we will create an '''object''' of '''InputStreamReader'''.
+
| હવે, આપણે '''InputStreamReader''' નું ઓબ્જેક્ટ બનાવીશું.
  
 
|-
 
|-
 
|  03:24
 
|  03:24
|For that, inside the main method type '''InputStreamReader''' ''space'' '''isr''' ''equalto'' '''new''' ''space'' '''InputStreamReader'''   parentheses.
+
|આ માટે, '''main''' મેથડની અંદર ટાઈપ કરો '''InputStreamReader સ્પેસ isr બરાબર new સ્પેસ InputStreamReader''' કૌંસ
  
 
|-
 
|-
 
|  03:44
 
|  03:44
| Within  parentheses, type '''System''' ''dot'' '''in '''and then semicolon.
+
| કૌંસમાં, ટાઈપ કરો '''System dot in''' અને ત્યારબાદ અર્ધવિરામ.
  
 
|-
 
|-
 
|  03:52
 
|  03:52
|'''InputStreamReader '''is a '''class''' in '''java'''which allows us to take the user  input .
+
|'''InputStreamReader''' એ જાવામાંનો ક્લાસ છે જે આપણને યુઝર ઈનપુટ લેવા માટેની પરવાનગી આપે છે.  
 
+
 
|-
 
|-
 
|  04:01
 
|  04:01
|'''System '''''dot''''' in'''tells the''' java compiler''' to take the '''input''' from the user using keyboard.
+
|'''System dot in''' એ જાવા કમ્પાઈલરને કીબોર્ડની મદદથી યુઝરમાંથી ઈનપુટ લેવાનું દર્શાવે છે.  .
  
 
|-
 
|-
 
|  04:10
 
|  04:10
|The input that '''System '''''dot '''''in '''takes is stored in the '''object''' of '''InputStreamReader '''for sometime'''.'''
+
|''System dot in''' જે ઈનપુટ લે છે તે થોડાક સમય માટે '''InputStreamReader''' માં સંગ્રહિત થાય છે.  
  
 
|-
 
|-
 
|  04:17
 
|  04:17
|After this we create an '''object''' of '''BufferedReader'''.
+
|આનાં પછીથી આપણે '''BufferedReader''' નો ઓબ્જેક્ટ બનાવીએ છીએ.
  
 
|-
 
|-
 
| 04:22  
 
| 04:22  
|So type, '''BufferedReader''' '''br''' ''equal to '''''new''' ''space'' '''BufferedReader''' and then parentheses.
+
|તો ટાઈપ કરો, '''BufferedReader br બરાબર new સ્પેસ BufferedReader અને ત્યારબાદ કૌંસ'''
  
 
|-
 
|-
 
|  04:36
 
|  04:36
|Inside the parentheses, type the '''object''' of '''InputStreamReader '''which is '''isr'''.
+
|કૌંસમાં, '''InputStreamReader''' નો ઓબ્જેક્ટ ટાઈપ કરો જે '''isr''' છે.  
  
 
|-
 
|-
 
|  04:43
 
|  04:43
|Now, '''isr '''only helps to take the input from the user.
+
|હવે, '''isr''' ફક્ત વપરાશકર્તાથી ઈનપુટ લેવા માટે મદદ કરે છે.  
  
 
|-
 
|-
 
|  04:48
 
|  04:48
|'''BufferedReader''' helps to store the value in the '''BufferedReader object'''.
+
|''''BufferedReader''' '''BufferedReader''' ઓબ્જેક્ટમાં વેલ્યુ સંગ્રહિત કરવા માટે મદદ કરે છે. .
  
 
|-
 
|-
 
|  04:54
 
|  04:54
|'''Isr '''passes this value to the '''BufferedReader object''' to store it.
+
|'''Isr''' આ વેલ્યુને '''BufferedReader''' ઓબ્જેક્ટ પાસે તેને સંગ્રહિત કરવા માટે પહોંચાડે છે.  
  
 
|-
 
|-
 
|  05:01
 
|  05:01
Now, let us start taking input from the user.
+
હવે, ચાલો વપરાશકર્તાથી ઈનપુટ લેવાનું ચાલુ કરીએ.
  
 
|-
 
|-
 
|  05:06
 
|  05:06
|We will first ask the user to enter a '''String'''. So create a variable of '''String type'''
+
|આપણે સૌ પ્રથમ વપરાશકર્તાને સ્ટ્રીંગ નાખવાનું કહીશું. આમ '''String type''' ની વેરીએબલ બનાવવા માટે 
  
  
 
|-
 
|-
 
|  05:14
 
|  05:14
|Type, '''String space str semicolon'''
+
|ટાઈપ કરો, '''String space str અર્ધવિરામ'''
  
 
|-
 
|-
 
|  05:19
 
|  05:19
| Now ask the user to enter his name.
+
| હવે વપરાશકર્તાને તેનું નામ દાખલ કરવા માટે પૂછો.
  
 
|-
 
|-
 
|  05:23
 
|  05:23
|So type, '''System '''''dot'' '''out '''''dot'' '''println''' ''within brackets and double quotes'' '''Enter your name'''and then'''semicolon'''.
+
|તો ટાઈપ કરો, '''System dot out dot println''' કૌંસમાં બે અવતરણમાં '''Enter your name''' અને ત્યારબાદ અર્ધવિરામ.    
  
 
|-
 
|-
 
|  05:33
 
|  05:33
| To take the input as  '''String''' we will type.
+
| ઈનપુટને '''સ્ટ્રીંગ''' ની જેમ લેવા માટે આપણે ટાઈપ કરીશું.
  
 
|-
 
|-
 
|  05:37
 
|  05:37
|  '''str''' ''equal to'' '''br''' ''dot'' '''readLine''' parentheses and then semicolon.
+
|  '''str બરાબર br dot readLine કૌંસ''' અને ત્યારબાદ અર્ધવિરામ..
  
 
|-
 
|-
 
|  05:45
 
|  05:45
|The readLine method will read the input from the user '''.'''
+
|'''readLine''' મેથડ વપરાશકર્તામાંથી ઈનપુટ વાંચશે.
  
 
|-
 
|-
 
|  05:51  
 
|  05:51  
|Now, let us take the input as an '''integer'''. Create a variable of type'''int'''.
+
|હવે, ચાલો ઈનપુટને ઇન્ટીજર તરીકે લઈએ. '''int''' પ્રકારનું વેરીએબલ બનાવો.  
 +
 
 
|-
 
|-
 
|  06:01
 
|  06:01
|So type''' int n '''''semicolon.''
+
|તો ટાઈપ કરો '''int n''' અર્ધવિરામ.  
  
 
|-
 
|-
 
|  06:05
 
|  06:05
|Ask the user to enter his age.
+
|વપરાશકર્તાને તેની ઉંમર દાખલ કરવા માટે પૂછો.  
  
 
|-
 
|-
 
|  06:08
 
|  06:08
| So Type, '''System''' ''dot'' '''out''' ''dot'' '''println''' ''within brackets and double quotes''''' Enter your age''' semicolon.
+
| તો ટાઈપ કરો, '''System dot out dot println''' કૌંસમાં બે અવતરણમાં '''Enter your age''' અર્ધવિરામ.
  
 
   
 
   
 
|-
 
|-
 
|  06:21
 
|  06:21
|Also, create another variable named '''str1''' of '''String''' type in order to take the input.
+
|સાથે જ, ઈનપુટ લઇ શકાય એ માટે '''String''' પ્રકારનું '''str1''' નામનું બીજું એક વેરીએબલ બનાવો.  
  
  
 
|-
 
|-
 
|  06:31
 
|  06:31
|Now to take the input as '''String,''' type '''str1 '''''equal to '''''br''' ''dot'' '''readLine''' parentheses and then semicolon.
+
|હવે ઈનપુટને સ્ટ્રીંગ તરીકે લેવા માટે, ટાઈપ કરો '''str1 બરાબર br dot readLine કૌંસ અને ત્યારબાદ અર્ધવિરામ'''.  
  
 
|-
 
|-

Revision as of 15:15, 3 September 2013

Time' Narration
00:02 BufferedReader ની મદદથી યુઝર ઈનપુટ લેવા પરનાં સ્પોકન ટ્યુટોરીયલમાં સ્વાગત છે.
00:09 આ ટ્યુટોરીયલમાં આપણે શીખીશું:
00:11 જાવામાં યુઝર ઈનપુટ લેવાનું
00:13 InputStreamReader અને BufferedReader વિશે


00:17 આ ટ્યુટોરીયલનાં અનુસરણ માટે તમને જાણ હોવી જોઈએ કે:
00:19 એક્લીપ્સ' માં સાદું જાવા પ્રોગ્રામ કેવી રીતે લખવું, કમ્પાઈલ કરવું અને રન કરવું
00:24 તમને જાવામાનાં ડેટા ટાઈપ વિશે પણ માહિતી હોવી જરૂરી છે
00:27 જો નથી, તો spoken hyphen tutorial dot org પર ઉપલબ્ધ આ વિષયો પરનાં સ્પોકન ટ્યુટોરીયલોનો સંદર્ભ લો..


00:35 અહીં, હું વાપરી રહ્યી છું,
 ઉબુન્ટુ આવૃત્તિ ૧૧.૧૦

જેડીકે ૧.૬ અને

એક્લીપ્સ IDE ૩.૭.૦

00:44 હવે, આપણે શીખીશું કે BufferedReader શું છે!
00:48 આ એક ક્લાસ છે જેનો ઉપયોગ ઈનપુટ સ્ટ્રીમમાંથી ટેક્સ્ટ વાંચવા માટે થાય છે.
00:53 અક્ષરોનાં અને લાઈનનાં એરેને વાંચવા માટે આ એક અસરકારક માર્ગ પૂરું પાડે છે.


00:59 BufferedReader ને ઉપયોગમાં લેવા માટે, આપણને java dot io પેકેજ માંથી ત્રણ ક્લાસોને આયાત કરવાની જરૂર છે.
01:05 આ ત્રણ ક્લાસો છે:
  • IOException
  • InputStreamReader અને
  • BufferedReader
01:12 આપણે પેકેજો વિશે અને ક્લાસો ને કેવી રીતે આયાત કરવું એ વિશે આવનારા ટ્યુટોરીયલોમાં શીખીશું.
01:18 હવે ઈનપુટને કેવી રીતે લેવાય છે?
01:21 એ બધાજ ઈનપુટ જે આપણે વપરાશકર્તાથી લઈએ છીએ તે બધા સ્ટ્રીંગ સ્વરૂપમાં રહેશે.
01:26 તે બધાને ત્યાર પછીથી ટાઇપકાસ્ટ અથવા કે અમુક ચોક્કસ ડેટા પ્રકારમાં બદલી કરવું પડે છે.
01:31 આપણે તેને ત્યારે જોઈશું જયારે આપણે યુઝર ઈનપુટ લેવા માટે આપણું પ્રોગ્રામ લખીશું.
01:35 હવે, ચાલો આપણે BufferedReader ને અમલમાં લેવા માટેની વાક્યરચનાઓને જોઈએ
01:39 જેમ તમે ત્રણ ક્લાસોને આયાત કરશો, તમને InputStreamReader નું ઓબ્જેક્ટને બનાવવાની જરૂર છે.
01:45 એ સાથે જ તમને BufferedReasder નું ઓબ્જેક્ટ પણ બનાવવાની જરૂર છે.
01:49 આપણે આ વિશે વિગતમાં જાણીશું, જયારે આપણે આપણું પ્રોગ્રામ લખીશું.
01:54 તો, ચાલો એક્લીપ્સ પર જઈએ.
01:56 મેં પહેલાથી જ InputBufferedReader નામનો ક્લાસ ખોલ્યો છે.
02:00 java.io પેકેજને આયાત કરવાની સાથે આપણે શરૂઆત કરીશું.


02:04 તો ટાઈપ કરો, import ક્લાસની પહેલા સ્પેસ java dot io dot star અર્ધવિરામ.
02:14 આ આયાત કરશે InputStreamReader, BufferedReader અને IOException ક્લાસોને.
02:20 આ આયાત કરશે InputStreamReader, BufferedReader અને IOException ક્લાસોને.
02:25 જે કંઈપણ મેથડ આપણે BufferedReader માં વાપરીએ છીએ તેમાં આપણને IOException નાખવાની જરૂર છે.
02:31 તેથી main મેથડની તુરંત બાદ ટાઈપ કરો throws IOException.
02:42 હવે, આનો શું અર્થ થાય છે?
02:45 Exceptions એ એરરો છે જે જાવામાં ત્યારે ઉદભવે છે જયારે અનપેક્ષિત સંજોગો બને છે.
02:52 Exceptions એરરોને અટકાવવા માટે આપણને throws કીવર્ડ વાપરવું પડે છે.
02:57 Throws એ એક કીવર્ડ છે જે Exception handling વેળાએ વપરાય છે.
03:00 આ ત્યારે વપરાય છે જયારે આપણે જાણીએ છીએ કે Exceptions એરરો ચોક્કસ ઉદભવશે.
03:05 જયારે આપણે BufferedReader ને વાપરીએ છીએ, Exceptions એરરો હંમેશા આવે છે.
03:10 Exceptions એરરોને આવતા અટકાવવા આપણને throws IOException વાપરવાની જરૂર પડે છે.
03:16 આપણે Exception Handling વિશે આવનારા ટ્યુટોરીયાલોમાં શીખીશું.
03:20 હવે, આપણે InputStreamReader નું ઓબ્જેક્ટ બનાવીશું.
03:24 આ માટે, main મેથડની અંદર ટાઈપ કરો InputStreamReader સ્પેસ isr બરાબર new સ્પેસ InputStreamReader કૌંસ
03:44 કૌંસમાં, ટાઈપ કરો System dot in અને ત્યારબાદ અર્ધવિરામ.
03:52 InputStreamReader એ જાવામાંનો ક્લાસ છે જે આપણને યુઝર ઈનપુટ લેવા માટેની પરવાનગી આપે છે.
04:01 System dot in એ જાવા કમ્પાઈલરને કીબોર્ડની મદદથી યુઝરમાંથી ઈનપુટ લેવાનું દર્શાવે છે. .
04:10 System dot in' જે ઈનપુટ લે છે તે થોડાક સમય માટે InputStreamReader માં સંગ્રહિત થાય છે.
04:17 આનાં પછીથી આપણે BufferedReader નો ઓબ્જેક્ટ બનાવીએ છીએ.
04:22 તો ટાઈપ કરો, BufferedReader br બરાબર new સ્પેસ BufferedReader અને ત્યારબાદ કૌંસ
04:36 કૌંસમાં, InputStreamReader નો ઓબ્જેક્ટ ટાઈપ કરો જે isr છે.
04:43 હવે, isr ફક્ત વપરાશકર્તાથી ઈનપુટ લેવા માટે મદદ કરે છે.
04:48 'BufferedReaderBufferedReader ઓબ્જેક્ટમાં વેલ્યુ સંગ્રહિત કરવા માટે મદદ કરે છે. .
04:54 Isr આ વેલ્યુને BufferedReader ઓબ્જેક્ટ પાસે તેને સંગ્રહિત કરવા માટે પહોંચાડે છે.
05:01 હવે, ચાલો વપરાશકર્તાથી ઈનપુટ લેવાનું ચાલુ કરીએ.
05:06 આપણે સૌ પ્રથમ વપરાશકર્તાને સ્ટ્રીંગ નાખવાનું કહીશું. આમ String type ની વેરીએબલ બનાવવા માટે


05:14 ટાઈપ કરો, String space str અર્ધવિરામ
05:19 હવે વપરાશકર્તાને તેનું નામ દાખલ કરવા માટે પૂછો.
05:23 તો ટાઈપ કરો, System dot out dot println કૌંસમાં બે અવતરણમાં Enter your name અને ત્યારબાદ અર્ધવિરામ.
05:33 ઈનપુટને સ્ટ્રીંગ ની જેમ લેવા માટે આપણે ટાઈપ કરીશું.
05:37 str બરાબર br dot readLine કૌંસ અને ત્યારબાદ અર્ધવિરામ..
05:45 readLine મેથડ વપરાશકર્તામાંથી ઈનપુટ વાંચશે.
05:51 હવે, ચાલો ઈનપુટને ઇન્ટીજર તરીકે લઈએ. int પ્રકારનું વેરીએબલ બનાવો.
06:01 તો ટાઈપ કરો int n અર્ધવિરામ.
06:05 વપરાશકર્તાને તેની ઉંમર દાખલ કરવા માટે પૂછો.
06:08 તો ટાઈપ કરો, System dot out dot println કૌંસમાં બે અવતરણમાં Enter your age અર્ધવિરામ.


06:21 સાથે જ, ઈનપુટ લઇ શકાય એ માટે String પ્રકારનું str1 નામનું બીજું એક વેરીએબલ બનાવો.


06:31 હવે ઈનપુટને સ્ટ્રીંગ તરીકે લેવા માટે, ટાઈપ કરો str1 બરાબર br dot readLine કૌંસ અને ત્યારબાદ અર્ધવિરામ.
06:45 To convert it into integer datatype, type n equal to Integer dot parseInt within brackets str1semicolon
07:05 Integer is a class and parseInt is its method.
07:11 This method converts the argument passed within the bracket into integer.
07:18 Now, let us display the output for name and age.
07:22 So, type System dot out dot println within brackets and double quotes The name is plus str semicolon.
07:38 Next line type, System dot out dot println The ages plus n and thensemicolon.
07:50 Now, Save the file, press Ctrl, Skeys. Now let us run the program
07:55 So press Control and F11 keys.
08:00 In the output, you are asked to Enter your name.
08:03 So type your name. I will type here Ramu press Enter.
08:08 You will be asked to enter your age.
08:11 I will type here20 and then press Enter
08:13 We get the output as :
08:15 The name is Ramu
08:16 And The age is 20.
08:18 Thus we know how to take an input from the user.
08:24 In this tutorial we have learnt :
08:26 About InputStreamReader
08:28 About BufferedReader
08:29 And Converting from String to the desired datatype


08:33 For self-assessment, take a float, byte and character input from the user and then display the output
08:42 Also take a number as input and divide it by 3 then Display the output on the console.
08:49 To know more about the spoken tutorial project;Watch the video available at the following link
08:54 It summarises the Spoken Tutorial project
08:57 If you do not have good bandwidth, you can download and watch it
09:02 The Spoken Tutorial Project Team
09:04 Conducts workshops using spoken tutorials
09:07 Gives certificates to those who pass an online test
09:11 For more details, please write to contact@spoken-tutorial.org
09:18 Spoken Tutorial Project is a part of the Talk to a Teacher project
09:21 It is supported by the National Mission on Education through ICT, MHRD, Government of India
09:27 More information on this Mission is available at: http://spoken-tutorial.org\NMEICT-Intro
09:36 This is Arya Ratish from IIT Bombay.

Thank You for joining.

Contributors and Content Editors

Jyotisolanki, Krupali, PoojaMoolya, Pratik kamble