Java/C2/Relational-Operations/Gujarati
From Script | Spoken-Tutorial
| Time' | Narration |
| 00:01 | જાવામાં રીલેશનલ ઓપરેટર્સ પરના સ્પોકન ટ્યુટોરીયલમાં તમારું સ્વાગત છે. |
| 00:07 | આ ટ્યુટોરીયલમાં આપણે શીખીશું, |
| 00:09 | boolean ડેટા ટાઇપ |
| 00:10 | રીલેશનલ ઓપરેટર અને |
| 00:12 | રીલેશનલ ઓપરેટરના ઉપયોગથી ડેટા કેવી રીતે સરખાવવું. |
| 00:17 | આ ટ્યુટોરીયલ માટે હું,
Ubuntu 11.10, JDK 1.6 અને Eclipse 3.7 નો ઉપયોગ કરી રહ્યી છું. |
| 00:26 | આ ટ્યુટોરીયલ અનુસરવા માટે, તમને જવામાં ડેટા ટાઇપનું જ્ઞાન હોવું જરૂરી છે. |
| 00:31 | જો નહિં, તો સંબંધિત ટ્યુટોરિયલ્સ માટે, નીચે આપેલ અમારી વેબસાઇટ જુઓ. |
| 00:39 | રીલેશનલ ઓપરેટરો કન્ડીશન ચકાસવા માટે ઉપયોગ થાય છે. |
| 00:43 | તેમનું આઉટપુટ બુલિયન ડેટા ટાઇપનું વેરિયેબલ છે
|
| 00:48 | બુલિયન ડેટા ટાઇપ 1 બીટ માપનું છે
|
| 00:51 | તે માત્ર બે વેલ્યુઝ સંગ્રહે છે. |
| 00:54 | True અથવા False.
|
| 00:56 | કન્ડીશન સાચી હોય ત્યારે True આવે છે.
|
| 00:59 | કન્ડીશન ખોટી હોય ત્યારે False આવે છે. |
| 01:06 | અહીં ઉપલબ્ધ રીલેશનલ ઓપરેટરોની યાદી છે.
|
| 01:10 | * ગ્રેટર ધેન |
| 01:12 | * લેસ ધેન |
| 01:13 | * ઇકવલ ટુ |
| 00:14 | * ગ્રેટર ધેન ઓર ઇકવલ ટુ |
| 01:15 | * લેસ ધેન ઓર ઇકવલ ટુ |
| 01:17 | * નોટ ઇકવલ ટુ |
| 01:19 | આપણે તે દરેકને વિગતવાર જોશું. |
| 01:22 | એક્લીપ્સ ઉપર જાઓ. |
| 01:27 | અહીં આપણી પાસે Eclipse IDE અને બાકીના કોડ માટે જરૂરી માળખું છે.
|
| 01:33 | મેં BooleanDemo ક્લાસ બનાવ્યો છે અને Main મેથડ ઉમેર્યી છે.
|
| 01:38 | હવે ચાલો કેટલાક એક્સ્પ્રેશનો ઉમેરિયે. |
| 01:41 | ટાઇપ કરો, boolean b ;
|
| 01:47 | boolean કીવર્ડ b વેરિયેબલનું ડેટા ટાઇપ boolean તરીકે જાહેર કરશે. |
| 01:53 | આપણે આપણી કન્ડીશનનું પરિણામ b માં સંગ્રહ કરીશું. |
| 01:5 | આપણે weight વેરિયેબલ જાહેર કરીશું અને તે વેરિયેબલની મદદથી કન્ડીશન તપાસીશું.
|
| 02:05 | int weight ઇકવલ ટુ 45;
|
| 02:13 | આપણે તપાસ કરીશું કે weight ની વેલ્યુ 40 કરતાં વધારે છે કે નહી.
|
| 02:18 | b ઇકવલ ટુ weight ગ્રેટર ધેન 40;
|
| 02:28 | આ સ્ટેટમેન્ટ વેરિયેબલની વેલ્યુ ૪૦ કરતા વધારે છે કે નહી તે ચેક કરવા માટે કહે છે અને પરિણામ b માં સંગ્રહો.
|
| 02:37 | હવે ચાલો b ની વેલ્યુ પ્રિન્ટ કરીએ.
|
| 02:41 | System dot out dot println(b);
|
| 02:49 | Save અને Run કરો. |
| 02:59 | આપણે જોઈ શકીએ છીએ, આઉટપુટ True છે. |
| 03:02 | ચાલો જોઈએ શું થશે જો વેલ્યુ 40 કરતાં ઓછી હોય.
|
| 03:07 | weight 30 થી બદલો.
|
| 03:12 | સંગ્રહો અને રન કરો. |
| 03:20 | આપણે જોઈ શકીએ છીએ કે આઉટપુટ અપેક્ષા પ્રમાણે False આવ્યું છે. |
| 03:24 | આ રીતે, greater than સિમ્બોલ એક વેલ્યુ બીજી વેલ્યુ કરતા મોટી છે કે નહી તે ચકાસણી કરવા માટે વપરાય છે.
|
| 03:30 | એ જ રીતે, less than સિમ્બોલ એક વેલ્યુ બીજી વેલ્યુ કરતા નાની છે કે નહી તે ચકાસણી કરવા માટે વપરાય છે. |
| 03:37 | ચાલો greater than ને less than " સિમ્બોલમાં બદલીએ.
|
| 03:43 | તો આપણે ચકાસીએ છીએ કે weight ની વેલ્યુ 40 કરતા નાની છે કે નહી.
|
| 03:48 | Save Run |
| 03:56 | આપણે જોઈ શકીએ છીએ, અપેક્ષા પ્રમાણે આઉટપુટ True છે.
|
| 04:01 | ચાલો weight ની વેલ્યુ 45 થી બદલીએ અને આઉટપુટ જુઓ.
|
| 04:09 | Save અને Run કરો. |
| 04:16 | આપણે જોઈએ છીએ કે આપણને False મળે છે કારણ કે,
|
| 04:21 | weight લેસ ધેન 40 કન્ડીશન સાચી નથી.
|
| 04:25 | હવે ચાલો એક વેલ્યુ બીજી વેલ્યુ સમાન છે તે કેવી રીતે ચકાસવું તે જોઈએ. |
| 04:31 | તે કરવા માટે, આપણે બે ઇકવલ ટુ સિમ્બોલ વાપરીશું.
|
| 04:35 | લેસ ધેન સિમ્બોલને ડબલ ઇકવલ ટુ સિમ્બોલ માં બદલો.
|
| 04:41 | Save અને Run કરો. |
| 04:48 | આપણે જોઈ શકીએ છીએ, આઉટપુટ False છે કારણ કે weight ની વેલ્યુ 40 બરાબર નથી. |
| 04:55 | હવે ચાલો weight ને 40 થી બદલીએ અને આઉટપુટ જોઈએ. |
| 05:01 | Save અને Run કરો. |
| 05:08 | આપણે જોઈ શકીએ છીએ કે આઉટપુટ True છે.
|
| 05:12 | આ પ્રમાણે, ડબલ ઇકવલ ટુ, સમાનતાની ચકાસણી કરવા માટે વપરાય છે.
|
| 05:16 | કાળજી રાખો, કારણ કે ઘણી વાર લોકો સમાનતા તપાસ કરવા માટે સિંગલ ઇકવલ ટુ નો ઉપયોગ કરે છે.
|
| 05:22 | અને આ બિનજરૂરી એરર આપે છે. |
| 05:26 | આગામી આપણે જોશું લેસ ધેન ઓર ઇકવલ ટુ માટે કેવી રીતે તપાસવું.
|
| 05:30 | તે કરવા માટે, આપણે લેસ ધેન સિમ્બોલ આગળ ઇકવલ ટુ સિમ્બોલનો ઉપયોગ કરીશું.
|
| 05:35 | ડબલ ઇકવલ ટુ ને લેસ ધેન ઇકવલ ટુ સાથે બદલો.
|
| 05:42 | Save અને Run કરો. |
| 05:50 | અપેક્ષા પ્રમાણે આઉટપુટ True આવ્યું છે.
|
| 05:53 | હવે, લેસ ધેન ચેક થાય છે કે નહી તે જોવા માટે ચાલો weight ની વેલ્યુ બદલીએ. |
| 05:59 | 40 ને 30 થી બદલો. |
| 06:04 | Save અને Run કરો.
|
| 06:14 | આપણે જોઈએ છીએ કે weight 40 સમાન નથી તેથી આઉટપુટ True મળે છે કારણ કે તે 40 કરતાં ઓછી છે.
|
| 06:22 | ચાલો જોઈએ શું થશે, જો weight ની કિંમત 40 કરતાં વધારે હોય. |
| 06:274 | ધારો કે 50 છે. Save અને Run કરો. |
| 06:39 | આપણે જોઈ શકીએ છીએ, આઉટપુટ False છે કારણ કે weight ની વેલ્યુ 40 સમાન નથી.
|
| 06:44 | અને તે 40 કરતા ઓછી પણ નથી. |
| 06:48 | Similarly we use a greater than symbol followed by an equal to symbol for checking greater than or equal to.
|
| 06:55 | Let us try it. |
| 06:57 | Change less than equal to to greater than equal to
|
| 07:04 | Save and Run.
|
| 07:10 | As we can see, the output is true because weight is greater than 40 |
| 07: 16 | Let us change weight to a value less than 40. Lets say 30.
|
| 07:25 | Save and Run. |
| 07:32 | We get a false because the value of weight is not greater than 40 and also not equal to 40. |
| 07:39 | Next, we’ll see how to check for not equal to
|
| 07:46 | It is done by using an exclamation mark followed by an equal to symbol.
|
| 07:53 | Change greater than to exclamation
|
| 07:59 | So this statement says check if the value of weight is not equal to 40 and store the result in b
|
| 08:08 | Save and Run |
| 08:16 | As we can see, the output is true because the values of weight is not equal to 40. |
| 08:23 | Let us change the weight to 40 and see the output. |
| 08:28 | Change 30to 40. |
| 08:31 | Save. Run. |
| 08:38 | We get a false because the condition weight not equal to 40 is false. |
| 08:45 | The not equal to condition can be thought of as opposite of equal to condition. |
| 08:50 | This is how we use the various relational operators to compare data in Java. |
| 08:58 | This brings us to the end of this tutorial.
|
| 09:01 | In this tutorial we have learnt, about the boolean data type |
| 09:06 | The relational operators and |
| 09:08 | how to use relational operators to compare two values |
| 09:13 | As an assignment for this tutorial, find out if the two expressions shown are equivalent? |
| 09:23 | To know more about the Spoken Tutorial project,
|
| 09:23 | * Watch the video available at[1] |
| 09:28 | * It summarises the Spoken Tutorial project |
| 09:31 | * If you do not have good bandwidth, you can download and watch it
|
| 09:36 | The Spoken Tutorial Project Team,
|
| 09:38 | Conducts workshops using spoken tutorials.
|
| 09:40 | Gives certificates for those who pass an online test. For more details, please write to contact AT spoken HYPHEN tutorial DOT org. |
| 09: 50 | Spoken Tutorial Project is a part of the Talk to a Teacher project.
|
| 09:54 | It is supported by the National Mission on Education through ICT, MHRD, Government of India.
|
| 10:00 | More information on this Mission is available at spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro |
| 10:05 | This tutorial has been contributed by TalentSprint. Thanks for joining.
|