<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arya+Ratish</id>
		<title>Script | Spoken-Tutorial - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arya+Ratish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Special:Contributions/Arya_Ratish"/>
		<updated>2026-04-11T16:12:41Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Printing-a-Presentation-Document/Malayalam</id>
		<title>LibreOffice-Suite-Impress/C2/Printing-a-Presentation-Document/Malayalam</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Printing-a-Presentation-Document/Malayalam"/>
				<updated>2014-03-24T07:42:03Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|VISUAL CUE&lt;br /&gt;
||NARRATION&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.00&lt;br /&gt;
||LibreOfficeImpress- Printing a Presentation ന്റെ spokentutorial ലേയ്ക്ക് സ്വാഗതം &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.06&lt;br /&gt;
||ഈ tutorial ല് നമ്മള് പ്രിന്റിങ്ങിന്റെ വിവിധ ഒപ്ഷൻസ് പഠിക്കും -&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.11&lt;br /&gt;
||Slides Handouts Notes കൂടാതെ Outline&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.16&lt;br /&gt;
||ഇവിടെ നമ്മള് ഉപയോഗിക്കുന്നത് UbuntuLinux10.04 കൂടാതെ LibreOfficeSuite പതിപ്പ് 3.3.4. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.25&lt;br /&gt;
||നിങ്ങളുടെ presentation ന് ഹാര്ഡ് കോപ്പികള് print ചെയ്യേണ്ട അവസരങ്ങളുണ്ടാകാം. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:29&lt;br /&gt;
||ഉദാഹരണത്തിന്, നിങ്ങള്ക്ക് നിങ്ങളുടെ പ്രേക്ഷകര്ക്ക് presentation ന്റെ പകര്പ്പുകള് പിന്നീടുള്ള പരാമര്ശത്തിനായാണ് നല്കേണ്ടതായി വന്നേക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.35 &lt;br /&gt;
||അതിനാല് ആദ്യം നമുക്ക് presentation Sample Impressൽ  double-click ചെയ്തുകൊണ്ട് തുറക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.41&lt;br /&gt;
||നിങ്ങളുടെ slides ന്റെ prints എടുക്കാന്, File ഉം  പിന്നെ Print ഉം ക്ലിക്ക് ചെയ്യുക, പകരമായി നമുക്ക് CTRL, P കീകൾ ഒരുമിച്ച് press ചെയ്യാം.&lt;br /&gt;
|-&lt;br /&gt;
|00.50&lt;br /&gt;
||General and Options tabs ന് കീഴിലുള്ള ക്രമീകരണങ്ങളറിയാന്,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.55&lt;br /&gt;
||LibreOffice Writer series ലുള്ള Viewing and printing Documents നെക്കുറിച്ചുള്ള tutorial കാണുക &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:02&lt;br /&gt;
||Document field ല് General tab ലെ Print നുതാഴെയായി  Impress ള്ള അതുല്യമായ വിവിധ options കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:09&lt;br /&gt;
||ഈ ഓപ്ഷനുകള് ആഗ്രഹിച്ച format ല് നമ്മുടെ slides ന്റെ print എടുക്കാന് സഹായിക്കും -&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:15&lt;br /&gt;
||Slides Handouts Notes കൂടാതെ Outline. നമ്മള് Slides option തിരഞ്ഞെടുക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:22&lt;br /&gt;
||ഇനി നമുക്ക് LibreOffice Impress tab ല് ക്ലിക്ക് ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:26&lt;br /&gt;
||ഇവിടെ നിങ്ങള്ക്ക് print ചെയ്യാനാഗ്രഹിക്കുന്ന slide ന്റെ ഭാഗങ്ങള് തിരഞ്ഞെടുക്കാം, c&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||പ്രിന്റ് ചെയ്യേണ്ട കളർ, സൈസ് ഉം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:34&lt;br /&gt;
||ഉള്ളടക്കത്തിനു കീഴില്, നമുക്ക് Slide name, Date ഉം time കൂടാതെ Hidden pages തിരഞ്ഞെടുക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:41 &lt;br /&gt;
||ടെക്സ്റ്റ് വിശദീകരിക്കുന്നതുപോലെ, ഇവ slide ന്റെ പേര് , തീയതി, സമയംകൂടാതെ&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||മറഞ്ഞിരിക്കുന്ന പേജുകൾ ഉണ്ടെങ്കിൽ അതും പ്രിന്റ് ചെയ്യും&lt;br /&gt;
|-&lt;br /&gt;
|01:49&lt;br /&gt;
||തുടര്ന്ന് Color ന് കീഴില് Gray scale തിരഞ്ഞെടുക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:53&lt;br /&gt;
||ടെക്സ്റ്റ് വിശദീകരിക്കുന്നതുപോലെ, മറ്റ് options സ്ലൈടിനെ അതിന്റെ original colour ല് print ചെയ്യും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||അല്ലെങ്കിൽ  black and white ല് &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:00&lt;br /&gt;
||Size നു കീഴില്  Fit to printable page തിരഞ്ഞെടുക്കുക. നിങ്ങള്ക്ക് Libre Office impress tab ല് നിങ്ങളുടേതായ മറ്റ് size ഓപ്ഷനുകൾ തിരയുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:10 &lt;br /&gt;
||നിങ്ങൾക്ക് prints എടുക്കാനുള്ള ആവശ്യമനുസരിച്ച് വിവിധ സാദ്ധ്യതകള് Page Layout tab ല് ലഭ്യമാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:18&lt;br /&gt;
||നമുക്ക് printout ന്റെ ഒരേ പേജില് ഒരുപാട് slides ആവശ്യമാണ് എന്ന് വിചാരിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:23&lt;br /&gt;
||അതിനാല്, Pages per sheet തിരഞ്ഞെടുക്കുക. ഡിഫാൾട്ട്  ആയി, ഇത് prints 1 slide ആണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:29 &lt;br /&gt;
||ഇവിടെ ചെറിയ Page review കാണുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:33 &lt;br /&gt;
||drop-down arrow യില് ക്ലിക്ക് ചെയ്ത് print ചെയ്യാനുള്ള പേജുകളുടെ എണ്ണം തിരഞ്ഞെടുക്കുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:39&lt;br /&gt;
||നമ്മള് preview ല് 2 തിരഞ്ഞെടുത്താല്, നമുക്ക് 2 pages കാണാം. നമ്മള് 6 തിരഞ്ഞെടുത്താല് &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||Preview ല് നമുക്ക് 6 പേജുകള് കാണാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:48&lt;br /&gt;
||ഓരോ പേജ് option നും ചുറ്റിലും Draw a border തിരഞ്ഞെടുക്കുക, ഇത് ചുറ്റുമൊരു കറുത്ത border ഓരോ പേജിലും പ്രിന്റ് ചെയ്യുമ്പോൾ കൊടുക്കുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:56&lt;br /&gt;
||ഇത് പേജിനെ കൂടുതല് ആകര്ഷകമാക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:59&lt;br /&gt;
||അടുത്ത option, Brochure, ആണ് Brochure രൂപത്തിൽ പ്രിന്റ് ചെയ്യുമ്പോൾ അത് slides നെ മടക്കാൻ സഹായിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:06&lt;br /&gt;
||എന്നിരുന്നാലും, നമ്മളീ option തിരഞ്ഞെടുക്കില്ല. നിങ്ങള്ക്കീ option നെക്കുറിച്ച് പിന്നീട് മനസ്സിലാക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:14 &lt;br /&gt;
||Options ടാബിലുള്ള check boxes അടയാളപ്പെടുത്തിയിട്ടില്ല എന്ന് ഉറപ്പുവരുത്തുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:19 &lt;br /&gt;
||ഈ check boxes പ്രത്യേക ആവശ്യങ്ങള്ക്കായുള്ളതാണ്, നമ്മളീ tutorial ല് അത്  ചര്ച്ച ചെയ്യില്ല.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:25&lt;br /&gt;
||ഇനി Print button ല് ക്ലിക്ക് ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:28&lt;br /&gt;
||printer കൃത്യമായി കോണ്ഫിഗര് ചെയ്തിട്ടുണ്ടെങ്കില്, printer ഇപ്പോള് പ്രിന്റ് ചെയ്ത് തുടങ്ങേണ്ടതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||ഇനി നമുക്ക് Handouts option നെക്കുറിച്ച് പഠിക്കാം. File ഉം Print ക്ലിക്ക് ചെയ്യുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:41 &lt;br /&gt;
||തുടര്ന്ന് General tab ലെ,Print  ലെ Document fieldൽ Handout തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:47&lt;br /&gt;
||ഡിഫാൾട്ട്  ആയി ഒരു പേജിൽ, 4 slides ഉണ്ട് കൂടാതെ  ഡിഫാൾട്ട് ക്രമം ഇടത്തു നിന്നും വലത്തേയ്ക്കും പിന്നെ താഴേയ്ക്കുമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 3:53&lt;br /&gt;
||ഇവ presentation നുവേണ്ടി മാറ്റമില്ലാതെ നിര്ത്തുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:58&lt;br /&gt;
||LibreOffice Impress tab ല് Size options പ്രവര്ത്തനരഹിതമാക്കിയിരിക്കുന്നത് നിങ്ങള്ക്ക് കാണാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:05 &lt;br /&gt;
||ഇതിന് കാരണം പ്രിന്റ് ന്റെ സൈസ്  എന്നത് ഷീറ്റിലെ സ്ലൈട്സ്ന്റെ എണ്ണം കൂടാതെ ഷീറ്റിന്റെ വലുപ്പത്തെ അശ്രയിച്ചിരിക്ക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||ഇനി Print button ല് ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:15&lt;br /&gt;
||printer കൃത്യമായി കോണ്ഫിഗര് ചെയ്തിട്ടുണ്ടെങ്കില്, printer അച്ചടിച്ചു തുടങ്ങേണ്ടതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:20&lt;br /&gt;
||നമുക്കാദ്യ slide ലേയ്ക്ക് പോയി Notes tab ല് ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:25&lt;br /&gt;
||ഇവിടെ നമ്മള് നോട്ടിൽ ടൈപ്പ് ചെയ്യുക - “This is a sample note” എന്നാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:30&lt;br /&gt;
||നിങ്ങളുടെ സ്ലയ്ടിൽ ടൈപ്പ് ചെയ്ത നോട്ടുകൾ പ്രിന്റ് ചെയ്യാൻ File ഉം Print ക്ലിക്ക് ചെയ്യുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:35&lt;br /&gt;
||General tab ല് Print ലെ, Document field ല് ക്ലിക്ക് ചെയ്യുക തുടര്ന്ന്  Notes option തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:42&lt;br /&gt;
||ഇടതുഭാഗത്തായി preview പേജില് പോവുക. ഇത് slide ന് ചുവടെ ടൈപ്പ് ചെയ്തിട്ടുള്ള നോട്ട് കാണിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:48&lt;br /&gt;
||ഇനി LibreOffice Impress tab ല് ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:52 &lt;br /&gt;
||നമ്മള് നോട്സ് print ചെയ്യുമ്പോള് Size options ലഭ്യമല്ല എന്ന് ഓര്ക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:57&lt;br /&gt;
||ഇനി Print button ല് ക്ലിക്ക് ചെയ്യുക. printer ശരിയായി കോണ്ഫിഗര് ചെയ്തിട്ടുണ്ടെങ്കില് എങ്കില്, printer ഇതിനകം printing ആരംഭിക്കേണ്ടതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:05 &lt;br /&gt;
||അവസാനമായി, presentation നിടെ slides ന്റെ ഔട്ട്ലൈന് print ചെയ്യാന് File and Print ല് ക്ലിക്ക് ചെയ്യുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:13 &lt;br /&gt;
||General tab ലെ, Print, ല് Document field ല് Outline option ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:19&lt;br /&gt;
||ഇടതുഭാഗത്തായുള്ള preview പേജില് നോക്കുക. ഇത് നിങ്ങളുടെ slides ന്റെ ഔട്ട്ലൈന് ക്രമം slide headings കൂടാതെ sub-points എന്നിവയോടൊപ്പം കാണിക്കും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:28&lt;br /&gt;
||LibreOffice Impress tab ല് ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:32&lt;br /&gt;
||ഒരിക്കല് കൂടി ശ്രദ്ധിക്കുക, അതായത്, Size options എന്നത് print Outline ചെയ്യുമ്പോള് ലഭ്യമല്ല.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:38&lt;br /&gt;
||ഇനി Print button ല് ക്ലിക്ക് ചെയ്യുക. printer കൃത്യമായി കോണ്ഫിഗര് ചെയ്തിട്ടുണ്ടെങ്കില്, printer അച്ചടിച്ചു തുടങ്ങേണ്ടതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:47 &lt;br /&gt;
||ഇതോടുകൂടി നമ്മുടെ ഈ tutorial അവസാനിച്ചു &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:52 &lt;br /&gt;
||ഇവിടെ നമ്മൾ Slides, Handouts, Notes കൂടാതെ Outline ന്റെ പ്രിന്റിംഗ് നെ കുറിച്ച് പഠിച്ചത്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:57 &lt;br /&gt;
||ഈ കോമ്പ്രഹന്ഷന് ടെസ്റ്റ് അസൈന്മെന്റ് പരീക്ഷിക്കുക. പുതിയൊരു presentation സൃഷ്ടിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:02 &lt;br /&gt;
|| രണ്ടാമത്തെ slide മാത്രം Print ചെയ്യുക അതും ആദ്യ നാല് slides handout കളായി വേണം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:10&lt;br /&gt;
||താഴെക്കാണുന്ന link ല് ലഭ്യമായ video കാണുക ഇത് Spoken Tutorial project summarize ചെയ്യുന്നു. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:16&lt;br /&gt;
||നിങ്ങള്ക്ക് മികച്ച bandwidth ഇല്ലെങ്കില് നിങ്ങള്ക്കത് ഡൌണ്ലോഡ് ചെയ്ത് കാണാം. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:21&lt;br /&gt;
||Spoken Tutorial Project Team spoken tutorials ഉപയോഗിച്ച് വര്ക്ഷോപ്പുകള് നടത്തുന്നു. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:27&lt;br /&gt;
||ഓണ്ലൈന് പരീക്ഷ ജയിക്കുന്നവര്ക്ക് സാക്ഷ്യപത്രങ്ങള് നല്കുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:31 &lt;br /&gt;
||കൂടുതല് വിശദാംശങ്ങള്ക്കായി എഴുതുക: spoken hyphen tutorial dot org. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:38&lt;br /&gt;
||Spoken Tutorial Project എന്നത് Talk to a Teacher project ന്റെ ഒരു ഭാഗമാണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:42&lt;br /&gt;
||ഇതിനെ പിന്തുണയ്ക്കുന്നത് National Mission on Education, ICT, MHRD, Government of India മുഖാന്തരമാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:50&lt;br /&gt;
||ഇതിനെക്കുറിച്ചുള്ള കൂടുതല് വിവരങ്ങള് spoken hyphen tutorial dot org slash NMEICThyphen Intro യില് ലഭ്യമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:01 &lt;br /&gt;
||ഈ tutorial സമാഹരിച്ചത് ശാലു ശങ്കർ, IIT Bombay&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:06 &lt;br /&gt;
||ഞങ്ങളോടൊപ്പം ചേർന്നതിനു നന്ദി&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Printing-a-Presentation-Document/Malayalam</id>
		<title>LibreOffice-Suite-Impress/C2/Printing-a-Presentation-Document/Malayalam</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Printing-a-Presentation-Document/Malayalam"/>
				<updated>2014-03-24T07:08:14Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|VISUAL CUE&lt;br /&gt;
||NARRATION&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.00&lt;br /&gt;
||LibreOfficeImpress- Printing a Presentation ന്റെ spokentutorial ലേയ്ക്ക് സ്വാഗതം &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.06&lt;br /&gt;
||ഈ tutorial ല് നമ്മള് പ്രിന്റിങ്ങിന്റെ വിവിധ ഒപ്ഷൻസ് പഠിക്കും -&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.11&lt;br /&gt;
||Slides Handouts Notes കൂടാതെ Outline&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.16&lt;br /&gt;
||ഇവിടെ നമ്മള് ഉപയോഗിക്കുന്നത് UbuntuLinux10.04 കൂടാതെ LibreOfficeSuite പതിപ്പ് 3.3.4. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.25&lt;br /&gt;
||നിങ്ങളുടെ presentation ന് ഹാര്ഡ് കോപ്പികള് print ചെയ്ത് ആവശ്യമുള്ള അവസരങ്ങളുമുണ്ടാകാം. ചെയ്യേണ്ട അവസരങ്ങൾ ഉണ്ടാകും &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:29&lt;br /&gt;
||ഉദാഹരണത്തിന്, നിങ്ങള്ക്ക് നിങ്ങളുടെ പ്രേക്ഷകര്ക്ക് presentation ന്റെ പകര്പ്പുകള് പിന്നീടുള്ള പരാമര്ശത്തിനായാണ് നല്കേണ്ടതായി വന്നേക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.35 &lt;br /&gt;
||അതിനാല് ആദ്യം നമുക്ക് presentation Sample Impressൽ  double-click ചെയ്തുകൊണ്ട് തുറക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.41&lt;br /&gt;
||നിങ്ങളുടെ slides ന്റെ prints എടുക്കാന്, File ഉം  പിന്നെ Print ഉം ക്ലിക്ക് ചെയ്യുക, പകരമായി നമുക്ക് CTRL, P കീകൾ ഒരുമിച്ച് press ചെയ്യാം.&lt;br /&gt;
|-&lt;br /&gt;
|00.50&lt;br /&gt;
||General and Options tabs ന് കീഴിലുള്ള ക്രമീകരണങ്ങളറിയാന്,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00.55&lt;br /&gt;
||LibreOffice Writer series ലുള്ള Viewing and printing Documents നെക്കുറിച്ചുള്ള tutorial കാണുക &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:02&lt;br /&gt;
||Document field ല് General tab ലെ Print നുതാഴെയായി  Impress ള്ള അതുല്യമായ വിവിധ options കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:09&lt;br /&gt;
||ഈ ഓപ്ഷനുകള് ആഗ്രഹിച്ച format ല് നമ്മുടെ slides ന്റെ print എടുക്കാന് സഹായിക്കും -&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:15&lt;br /&gt;
||Slides Handouts Notes കൂടാതെ Outline. നമ്മള് Slides option തിരഞ്ഞെടുക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:22&lt;br /&gt;
||ഇനി നമുക്ക് LibreOffice Impress tab ല് ക്ലിക്ക് ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:26&lt;br /&gt;
||ഇവിടെ നിങ്ങള്ക്ക് print ചെയ്യാനാഗ്രഹിക്കുന്ന slide ന്റെ ഭാഗങ്ങള് തിരഞ്ഞെടുക്കാം, c&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||പ്രിന്റ് ചെയ്യേണ്ട കളർ, സൈസ് ഉം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:34&lt;br /&gt;
||ഉള്ളടക്കത്തിനു കീഴില്, നമുക്ക് Slide name, Date ഉം time കൂടാതെ Hidden pages തിരഞ്ഞെടുക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:41 &lt;br /&gt;
||ടെക്സ്റ്റ് വിശദീകരിക്കുന്നതുപോലെ, ഇവ slide ന്റെ പേര് , തീയതി, സമയംകൂടാതെ&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||മറഞ്ഞിരിക്കുന്ന പേജുകൾ ഉണ്ടെങ്കിൽ അതും പ്രിന്റ് ചെയ്യും&lt;br /&gt;
|-&lt;br /&gt;
|01:49&lt;br /&gt;
||തുടര്ന്ന് Color ന് കീഴില് Gray scale തിരഞ്ഞെടുക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:53&lt;br /&gt;
||ടെക്സ്റ്റ് വിശദീകരിക്കുന്നതുപോലെ, മറ്റ് options സ്ലൈടിനെ അതിന്റെ original colour ല് print ചെയ്യും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||അല്ലെങ്കിൽ  black and white ല് &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:00&lt;br /&gt;
||Size നു കീഴില്  Fit to printable page തിരഞ്ഞെടുക്കുക. നിങ്ങള്ക്ക് Libre Office impress tab ല് നിങ്ങളുടേതായ മറ്റ് size ഓപ്ഷനുകൾ തിരയുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:10 &lt;br /&gt;
||നിങ്ങൾക്ക് prints എടുക്കാനുള്ള ആവശ്യമനുസരിച്ച് വിവിധ സാദ്ധ്യതകള് Page Layout tab ല് ലഭ്യമാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:18&lt;br /&gt;
||നമുക്ക് printout ന്റെ ഒരേ പേജില് ഒരുപാട് slides ആവശ്യമാണ് എന്ന് വിചാരിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:23&lt;br /&gt;
||അതിനാല്, Pages per sheet തിരഞ്ഞെടുക്കുക. ഡിഫാൾട്ട്  ആയി, ഇത് prints 1 slide ആണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:29 &lt;br /&gt;
||ഇവിടെ ചെറിയ Page review കാണുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:33 &lt;br /&gt;
||drop-down arrow യില് ക്ലിക്ക് ചെയ്ത് print ചെയ്യാനുള്ള പേജുകളുടെ എണ്ണം തിരഞ്ഞെടുക്കുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:39&lt;br /&gt;
||നമ്മള് preview ല് 2 തിരഞ്ഞെടുത്താല്, നമുക്ക് 2 pages കാണാം. നമ്മള് 6 തിരഞ്ഞെടുത്താല് &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||Preview ല് നമുക്ക് 6 പേജുകള് കാണാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:48&lt;br /&gt;
||ഓരോ പേജ് option നും ചുറ്റിലും Draw a border തിരഞ്ഞെടുക്കുക, ഇത് ചുറ്റുമൊരു കറുത്ത border ഓരോ പേജിലും പ്രിന്റ് ചെയ്യുമ്പോൾ കൊടുക്കുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:56&lt;br /&gt;
||ഇത് പേജിനെ കൂടുതല് ആകര്ഷകമാക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:59&lt;br /&gt;
||അടുത്ത option, Brochure, ആണ് Brochure രൂപത്തിൽ പ്രിന്റ് ചെയ്യുമ്പോൾ അത് slides നെ മടക്കാൻ സഹായിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:06&lt;br /&gt;
||എന്നിരുന്നാലും, നമ്മളീ option തിരഞ്ഞെടുക്കില്ല. നിങ്ങള്ക്കീ option നെക്കുറിച്ച് പിന്നീട് മനസ്സിലാക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:14 &lt;br /&gt;
||Options ടാബിലുള്ള check boxes അടയാളപ്പെടുത്തിയിട്ടില്ല എന്ന് ഉറപ്പുവരുത്തുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:19 &lt;br /&gt;
||ഈ check boxes പ്രത്യേക ആവശ്യങ്ങള്ക്കായുള്ളതാണ്, നമ്മളീ tutorial ല് അത്  ചര്ച്ച ചെയ്യില്ല.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:25&lt;br /&gt;
||ഇനി Print button ല് ക്ലിക്ക് ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:28&lt;br /&gt;
||printer കൃത്യമായി കോണ്ഫിഗര് ചെയ്തിട്ടുണ്ടെങ്കില്, printer ഇപ്പോള് പ്രിന്റ് ചെയ്ത് തുടങ്ങേണ്ടതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||ഇനി നമുക്ക് Handouts option നെക്കുറിച്ച് പഠിക്കാം. File ഉം Print ക്ലിക്ക് ചെയ്യുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:41 &lt;br /&gt;
||തുടര്ന്ന് General tab ലെ,Print  ലെ Document fieldൽ Handout തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:47&lt;br /&gt;
||ഡിഫാൾട്ട്  ആയി ഒരു പേജിൽ, 4 slides ഉണ്ട് കൂടാതെ  ഡിഫാൾട്ട് ക്രമം ഇടത്തു നിന്നും വലത്തേയ്ക്കും പിന്നെ താഴേയ്ക്കുമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 3:53&lt;br /&gt;
||ഇവ presentation നുവേണ്ടി മാറ്റമില്ലാതെ നിര്ത്തുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:58&lt;br /&gt;
||LibreOffice Impress tab ല് Size options പ്രവര്ത്തനരഹിതമാക്കിയിരിക്കുന്നത് നിങ്ങള്ക്ക് കാണാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:05 &lt;br /&gt;
||ഇതിന് കാരണം പ്രിന്റ് ന്റെ സൈസ്  എന്നത് ഷീറ്റിലെ സ്ലൈട്സ്ന്റെ എണ്ണം കൂടാതെ ഷീറ്റിന്റെ വലുപ്പത്തെ അശ്രയിച്ചിരിക്ക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||ഇനി Print button ല് ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:15&lt;br /&gt;
||printer കൃത്യമായി കോണ്ഫിഗര് ചെയ്തിട്ടുണ്ടെങ്കില്, printer അച്ചടിച്ചു തുടങ്ങേണ്ടതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:20&lt;br /&gt;
||നമുക്കാദ്യ slide ലേയ്ക്ക് പോയി Notes tab ല് ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:25&lt;br /&gt;
||ഇവിടെ നമ്മള് നോട്ടിൽ ടൈപ്പ് ചെയ്യുക - “This is a sample note” എന്നാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:30&lt;br /&gt;
||നിങ്ങളുടെ സ്ലയ്ടിൽ ടൈപ്പ് ചെയ്ത നോട്ടുകൾ പ്രിന്റ് ചെയ്യാൻ File ഉം Print ക്ലിക്ക് ചെയ്യുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:35&lt;br /&gt;
||General tab ല് Print ലെ, Document field ല് ക്ലിക്ക് ചെയ്യുക തുടര്ന്ന്  Notes option തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:42&lt;br /&gt;
||ഇടതുഭാഗത്തായി preview പേജില് പോവുക. ഇത് slide ന് ചുവടെ ടൈപ്പ് ചെയ്തിട്ടുള്ള നോട്ട് കാണിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:48&lt;br /&gt;
||ഇനി LibreOffice Impress tab ല് ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:52 &lt;br /&gt;
||നമ്മള് നോട്സ് print ചെയ്യുമ്പോള് Size options ലഭ്യമല്ല എന്ന് ഓര്ക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:57&lt;br /&gt;
||ഇനി Print button ല് ക്ലിക്ക് ചെയ്യുക. printer ശരിയായി കോണ്ഫിഗര് ചെയ്തിട്ടുണ്ടെങ്കില് എങ്കില്, printer ഇതിനകം printing ആരംഭിക്കേണ്ടതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:05 &lt;br /&gt;
||അവസാനമായി, presentation നിടെ slides ന്റെ ഔട്ട്ലൈന് print ചെയ്യാന് File and Print ല് ക്ലിക്ക് ചെയ്യുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:13 &lt;br /&gt;
||General tab ലെ, Print, ല് Document field ല് Outline option ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:19&lt;br /&gt;
||ഇടതുഭാഗത്തായുള്ള preview പേജില് നോക്കുക. ഇത് നിങ്ങളുടെ slides ന്റെ ഔട്ട്ലൈന് ക്രമം slide headings കൂടാതെ sub-points എന്നിവയോടൊപ്പം കാണിക്കും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:28&lt;br /&gt;
||LibreOffice Impress tab ല് ക്ലിക്ക് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:32&lt;br /&gt;
||ഒരിക്കല് കൂടി ശ്രദ്ധിക്കുക, അതായത്, Size options എന്നത് print Outline ചെയ്യുമ്പോള് ലഭ്യമല്ല.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:38&lt;br /&gt;
||ഇനി Print button ല് ക്ലിക്ക് ചെയ്യുക. printer കൃത്യമായി കോണ്ഫിഗര് ചെയ്തിട്ടുണ്ടെങ്കില്, printer അച്ചടിച്ചു തുടങ്ങേണ്ടതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:47 &lt;br /&gt;
||ഇതോടുകൂടി നമ്മുടെ ഈ tutorial അവസാനിച്ചു &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:52 &lt;br /&gt;
||ഇവിടെ നമ്മൾ Slides, Handouts, Notes കൂടാതെ Outline ന്റെ പ്രിന്റിംഗ് നെ കുറിച്ച് പഠിച്ചത്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:57 &lt;br /&gt;
||ഈ കോമ്പ്രഹന്ഷന് ടെസ്റ്റ് അസൈന്മെന്റ് പരീക്ഷിക്കുക. പുതിയൊരു presentation സൃഷ്ടിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:02 &lt;br /&gt;
|| രണ്ടാമത്തെ slide മാത്രം Print ചെയ്യുക അതും ആദ്യ നാല് slides handout കളായി വേണം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:10&lt;br /&gt;
||താഴെക്കാണുന്ന link ല് ലഭ്യമായ video കാണുക ഇത് Spoken Tutorial project summarize ചെയ്യുന്നു. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:16&lt;br /&gt;
||നിങ്ങള്ക്ക് മികച്ച bandwidth ഇല്ലെങ്കില് നിങ്ങള്ക്കത് ഡൌണ്ലോഡ് ചെയ്ത് കാണാം. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:21&lt;br /&gt;
||Spoken Tutorial Project Team spoken tutorials ഉപയോഗിച്ച് വര്ക്ഷോപ്പുകള് നടത്തുന്നു. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:27&lt;br /&gt;
||ഓണ്ലൈന് പരീക്ഷ ജയിക്കുന്നവര്ക്ക് സാക്ഷ്യപത്രങ്ങള് നല്കുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:31 &lt;br /&gt;
||കൂടുതല് വിശദാംശങ്ങള്ക്കായി എഴുതുക: spoken hyphen tutorial dot org. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:38&lt;br /&gt;
||Spoken Tutorial Project എന്നത് Talk to a Teacher project ന്റെ ഒരു ഭാഗമാണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:42&lt;br /&gt;
||ഇതിനെ പിന്തുണയ്ക്കുന്നത് National Mission on Education, ICT, MHRD, Government of India മുഖാന്തരമാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:50&lt;br /&gt;
||ഇതിനെക്കുറിച്ചുള്ള കൂടുതല് വിവരങ്ങള് spoken hyphen tutorial dot org slash NMEICThyphen Intro യില് ലഭ്യമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:01 &lt;br /&gt;
||ഈ tutorial സമാഹരിച്ചത് ശാലു ശങ്കർ, IIT Bombay&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:06 &lt;br /&gt;
||ഞങ്ങളോടൊപ്പം ചേർന്നതിനു നന്ദി&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam</id>
		<title>LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam"/>
				<updated>2014-03-24T06:41:27Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|VISUAL CUE&lt;br /&gt;
||NARRATION&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:00&lt;br /&gt;
||LibreOffice Impress-Viewing a Presentation നെക്കുറിച്ചുള്ള സ്പോകെൻ tutorial ലേയ്ക്ക് സ്വാഗതം &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:05 &lt;br /&gt;
||ഈ tutorial ല് നമ്മൾ View options നെക്കുറിച്ചും അതിന്റെ ഉപയോഗത്തെക്കുറിച്ചും കൂടാതെ അവയുടെ Master Pages നെക്കുറിച്ചും പഠിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:13 &lt;br /&gt;
||നമ്മളിവിടെ ഉപയോഗിക്കുന്നത് Ubuntu Linux 10.04 കൂടാതെ LibreOffice Suite പതിപ്പ് 3.3.4. എന്നിവയാണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:22&lt;br /&gt;
||നമുക്കാദ്യം ഡബിള് ക്ലിക്ക് ചെയ്ത് നമ്മുടെ presentation , “Sample Impress” തുറക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:27&lt;br /&gt;
||നിങ്ങള്ക്ക് ഒരുപാട് മെച്ചപ്പെട്ട presentation തയ്യാറാക്കാന് സഹായിക്കുന്ന ഒരുപാട് ഓപ്ഷനുകള് LibreOffice Impress ലുണ്ട്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:34&lt;br /&gt;
||നിങ്ങള് LibreOffice Impress തുറക്കുമ്പോള് സ്ഥിരസ്ഥിതിയായി കാഴ്ചയ്ക്ക്  ഡിഫാൾട്ട്  ആയി ഇങ്ങനെയിരിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:41 &lt;br /&gt;
||ഇതിനെ Normal view എന്ന് വിളിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:43&lt;br /&gt;
||presentation മറ്റേതെങ്കിലും വ്യൂവില് ആയിരിക്കുമ്പോള്,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:48 &lt;br /&gt;
||നിങ്ങള്ക്ക് Normal tabല് ക്ലിക്ക് ചെയ്ത് normal view യിലേയ്ക്ക് തിരിച്ചുപോകാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:53 &lt;br /&gt;
||അല്ലെങ്കില് View കൂടാതെ Normal ഉം ക്ലിക്ക് ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:57&lt;br /&gt;
||normal view യില്, നിങ്ങള്ക്ക് slides സൃഷ്ടിക്കാനും എഡിറ്റ് ചെയ്യാനും സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:02&lt;br /&gt;
||ഉദാഹരണത്തിന് നമുക്ക് സ്ലൈഡുകളുടെ ഡിസൈൻ മാറ്റാന് സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:05&lt;br /&gt;
||ഇത് ചെയ്യാന്, Overviewഎന്ന ശീര്ഷകമുള്ള slideല് പോവുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:09 &lt;br /&gt;
||Tasks pane ല് വലത് side ല് Master Pages വിഭാഗത്തില് “Used in This Presentation” ന് കീഴില് നമുക്ക് slide രൂപമാതൃകയായ prs strategy കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:21&lt;br /&gt;
||ഇതിനു കീഴില് നമുക്ക് Recently Used കൂടാതെ Available for Use slide എന്ന രൂപമാതൃകകള് കാണാന് സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:27&lt;br /&gt;
||നിങ്ങളുടെ ആഗ്രഹമനുസരിച്ച് ഏതിലെങ്കിലും Click ചെയ്യുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:31&lt;br /&gt;
||Workspace pane ലെ slide ഡിസൈൻന്റെ മാറ്റം ശ്രദ്ധിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:35&lt;br /&gt;
||slide ഡിസൈൻ മാറ്റാന് എത്രയെളുപ്പമാണ് എന്ന് കാണുക?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:39&lt;br /&gt;
||നിങ്ങൾ സൃഷ്ടിച്ച ഡിസൈൻ നിങ്ങളുടെ slideന്റെ പശ്ചാത്തലമായി കൊടുക്കാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:45&lt;br /&gt;
||അടുത്തതായി നമ്മള് Outline view കാണും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:47&lt;br /&gt;
||നിങ്ങള്ക്ക് ഈ കാഴ്ചയിലേയ്ക്ക് View കൂടാതെ Outline ല് click ചെയ്തു പോകാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:54 &lt;br /&gt;
||അല്ലെങ്കില് Outline tab ല് click ചെയ്തും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:57&lt;br /&gt;
||ഈ കാഴ്ചയില് ഇവിടെ, slides ക്രമീകരിച്ചിരിക്കുന്നത് ഉള്ളടക്ക പട്ടിക പോലെ ഒന്നിനു ചുവടെ മറ്റൊന്ന് എന്ന ക്രമത്തിലാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:05 &lt;br /&gt;
||ഇവ Slide Headings ആണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:08&lt;br /&gt;
||slide heading Overview ഹൈലൈറ്റ് ചെയ്യപ്പെട്ടിരിക്കുന്നത് ശ്രദ്ധിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:12&lt;br /&gt;
||Outline tab തിരഞ്ഞെടുത്തപ്പോള് നമ്മള് Overview സ്ലൈഡിലായിരുന്നതിനാലാണ് ഇത് സംഭവിച്ചത്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:18&lt;br /&gt;
||icons ഇവിടെ bullet points പോയിന്റുകളുടെ രൂപത്തിലും നിങ്ങള്ക്ക് കാണാം.  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:23 &lt;br /&gt;
||നിങ്ങള് ഈ bullet points കള്ക്ക് മുകളിലൂടെ mouse നീക്കുമ്പോള് cursor ഒരു കൈ മാതൃകയിലേയ്ക്ക് മാറുന്നത് നിങ്ങള്ക്ക് കാണാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:29&lt;br /&gt;
||നമുക്ക് തുടര്ന്ന് ഈ ഇനങ്ങളെ മുകളിലേയ്ക്കോ താഴേയ്ക്കോ മാറ്റുകയോ ഒരു slide ന് അകത്തുതന്നെ പുനഃക്രമീകരിക്കുകയോ ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:38&lt;br /&gt;
||അല്ലെങ്കില് സ്ലയ്ടുകളുടെ കുറുകെ.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:40&lt;br /&gt;
||നമുക്ക് ഈ മാറ്റങ്ങള് CTRL കൂടാതെ Z അമര്ത്തിക്കൊണ്ട് ഇല്ലാതാക്കാം, അതുവഴി നമ്മുടെ presentation അതിന്റെ അസല് രൂപത്തില് കാണാന് സാധിക്കും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|| Slide Sorter ഉപയോഗിച്ച് നമുക്ക് സ്ലയിട്സ്  റീഅറേഞ്ച്  ചെയ്യാം&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:53&lt;br /&gt;
||View കൂടാതെ Slide Sorter എന്നിവയില് click ചെയ്ത് നമുക്ക് Slide Sorter view യിലേയ്ക്ക് മാറാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:00&lt;br /&gt;
||അല്ലെങ്കില് Slide Sorter tab ല് click ചെയ്തുകൊണ്ട്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:04 &lt;br /&gt;
||ഈ view നിങ്ങള്ക്ക് ആഗ്രഹമുള്ള രീതിയില് slides പുനഃക്രമീകരിക്കുന്നതിന് സഹായിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:08&lt;br /&gt;
||ഉദാഹരണത്തിന് - slide നമ്പര് 9, 10 എന്നിവ മാറ്റാന്, slide നമ്പര് 10 ല് click ചെയ്യുക &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||എന്നിട്ട് slide നെ slide നമ്പര് 9 ന് മുമ്പിലേയ്ക്ക് ഇഴയ്ക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:18&lt;br /&gt;
||ഇനി mouse button വിടുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:22&lt;br /&gt;
||slides പരസ്പരം സ്ഥാനം മാറുന്നു!&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:26&lt;br /&gt;
||Notes view ല്, നിങ്ങള്ക്ക് നിങ്ങളുടെ presentation നെ സഹായിക്കുന്ന കുറിപ്പുകള് എഴുതാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:31&lt;br /&gt;
||Notes view യിലേയ്ക്ക് പോകാന്, View തുടര്ന്ന് Notes Page ല് click ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:36&lt;br /&gt;
||നിങ്ങള്ക്ക് Notes tab ലും click ചെയ്യാവുന്നതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:39 &lt;br /&gt;
||Slides pane ല് നിന്ന് ‘Development up to present’ എന്ന slide തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:44 &lt;br /&gt;
||notes ഭാഗത്ത് ചില വാക്കുകൾ ടൈപ്പ് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:49&lt;br /&gt;
||നിങ്ങളുടെ slide കള് projector ല് കാണുമ്പോള്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 3:51&lt;br /&gt;
||നിങ്ങള്ക്കപ്പോഴും മോണിറ്ററില് notes കാണാന് സാധിക്കും, പക്ഷെ നിങ്ങളുടെ കാഴ്ചക്കാര്ക്ക് അവ കാണുകയുമില്ല.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:58 &lt;br /&gt;
||ഇനി നമുക്ക് Normal tab ല് click ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:01&lt;br /&gt;
||നമുക്ക് വലതുഭാഗത്തെ Tasks pane, Layout section ല് presentation ന്റെ  layout മാറ്റാവുന്നതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:08&lt;br /&gt;
||Tasks pane കാണിക്കാനോ മറയ്ക്കാനോ, &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:12&lt;br /&gt;
||View കൂടാതെ Tasks Pane click ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:14 &lt;br /&gt;
||ഇത് Tasks pane കാണിക്കുകയോ മറയ്ക്കുകയോ ചെയ്യും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:18&lt;br /&gt;
||ഒരു slide ന്റെ layout മാറ്റാന് Layout section ഉപയോഗിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:23&lt;br /&gt;
||Development up to present എന്നു പേരായ slide തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:26&lt;br /&gt;
||Layoutല് നിന്ന് Title content ഉള്ളടക്കത്തിനു മുകളില് തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:33 &lt;br /&gt;
||ഇത് slide ന്റെ layout മാറ്റുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:37&lt;br /&gt;
||ഇതോടെ ഈ tutorial അവസാനിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:40&lt;br /&gt;
||ചുരുക്കത്തില് നമ്മള് പഠിച്ചത് - View options കൂടാതെ അവയുടെ ഉപയോഗങ്ങളും കൂടാതെ Master Pages ഉം ആണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:46 &lt;br /&gt;
||ഈ കോമ്പ്രഹന്ഷന് ടെസ്റ്റ് അസൈന്മെന്റ് പരീക്ഷിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:49 &lt;br /&gt;
||ഒരു പുതിയ presentation ശ്രമിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:52&lt;br /&gt;
||കരിനീല പശ്ചാത്തലവും ഇളം നീല ശീര്ഷക മെഖലയുമായി ഒരു മാസ്റ്റര് സൃഷ്ടിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:58&lt;br /&gt;
||താഴെക്കാണുന്ന ലിങ്കില് ലഭ്യമായ video കാണുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:02 &lt;br /&gt;
||ഇത് സ്പോകെൻ ടുടോറിയൽ പ്രോജെക്റ്റ് സമ്മറയിസ് ചെയ്യുന്നു.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:05&lt;br /&gt;
||നിങ്ങള്ക്ക് മികച്ച bandwidth ഇല്ലെങ്കില് നിങ്ങള്ക്കത് ഡൌണ്ലോഡ് ചെയ്ത് കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:12&lt;br /&gt;
||Spoken Tutorial Project Team spoken tutorials ഉപയോഗിച്ച് വര്ക്ഷോപ്പുകള് നടത്തുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:15&lt;br /&gt;
||ഓണ്ലൈന് പരീക്ഷ ജയിക്കുന്നവര്ക്ക് സാക്ഷ്യപത്രങ്ങള് നല്കുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:19&lt;br /&gt;
||കൂടുതല് വിശദാംശങ്ങള്ക്കായി contact@spoken-tutorial.org ലേയ്ക്ക് എഴുതുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:26&lt;br /&gt;
||Spoken Tutorial Project എന്നത് Talk to a Teacher project ന്റെ ഒരു ഭാഗമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:30 &lt;br /&gt;
||ഇതിനെ പിന്തുണയ്ക്കുന്നത് National Mission on Education, ICT, MHRD, Government of India മുഖാന്തരമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:38&lt;br /&gt;
||ഇതിനെക്കുറിച്ചുള്ള കൂടുതല് വിവരങ്ങള് spoken-tutorial.org/NMEICT-Intro യില് ലഭ്യമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:49&lt;br /&gt;
||ഈ tutorial സമാഹരിച്ചത് ശാലു  ശങ്കർ, IIT Bombay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:55 &lt;br /&gt;
||ഞങ്ങളോടൊപ്പം ചേർന്നതിന്  നന്ദി&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam</id>
		<title>LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam"/>
				<updated>2014-03-24T06:34:05Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|VISUAL CUE&lt;br /&gt;
||NARRATION&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:00&lt;br /&gt;
||LibreOffice Impress-Viewing a Presentation നെക്കുറിച്ചുള്ള സ്പോകെൻ tutorial ലേയ്ക്ക് സ്വാഗതം &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:05 &lt;br /&gt;
||ഈ tutorial ല് നമ്മൾ View options നെക്കുറിച്ചും അതിന്റെ ഉപയോഗത്തെക്കുറിച്ചും കൂടാതെ അവയുടെ Master Pages നെക്കുറിച്ചും പഠിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:13 &lt;br /&gt;
||നമ്മളിവിടെ ഉപയോഗിക്കുന്നത് Ubuntu Linux 10.04 കൂടാതെ LibreOffice Suite പതിപ്പ് 3.3.4. എന്നിവയാണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:22&lt;br /&gt;
||നമുക്കാദ്യം ഡബിള് ക്ലിക്ക് ചെയ്ത് നമ്മുടെ presentation , “Sample Impress” തുറക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:27&lt;br /&gt;
||നിങ്ങള്ക്ക് ഒരുപാട് മെച്ചപ്പെട്ട presentation തയ്യാറാക്കാന് സഹായിക്കുന്ന ഒരുപാട് ഓപ്ഷനുകള് LibreOffice Impress ലുണ്ട്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:34&lt;br /&gt;
||നിങ്ങള് LibreOffice Impress തുറക്കുമ്പോള് സ്ഥിരസ്ഥിതിയായി കാഴ്ചയ്ക്ക്  ഡിഫാൾട്ട്  ആയി ഇങ്ങനെയിരിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:41 &lt;br /&gt;
||ഇതിനെ Normal view എന്ന് വിളിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:43&lt;br /&gt;
||presentation മറ്റേതെങ്കിലും വ്യൂവില് ആയിരിക്കുമ്പോള്,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:48 &lt;br /&gt;
||നിങ്ങള്ക്ക് Normal tabല് ക്ലിക്ക് ചെയ്ത് normal view യിലേയ്ക്ക് തിരിച്ചുപോകാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:53 &lt;br /&gt;
||അല്ലെങ്കില് View കൂടാതെ Normal ഉം ക്ലിക്ക് ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:57&lt;br /&gt;
||normal view യില്, നിങ്ങള്ക്ക് slides സൃഷ്ടിക്കാനും എഡിറ്റ് ചെയ്യാനും സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:02&lt;br /&gt;
||ഉദാഹരണത്തിന് നമുക്ക് സ്ലൈഡുകളുടെ ഡിസൈൻ മാറ്റാന് സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:05&lt;br /&gt;
||ഇത് ചെയ്യാന്, Overviewഎന്ന ശീര്ഷകമുള്ള slideല് പോവുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:09 &lt;br /&gt;
||Tasks pane ല് വലത് side ല് Master Pages വിഭാഗത്തില് “Used in This Presentation” ന് കീഴില് നമുക്ക് slide രൂപമാതൃകയായ prs strategy കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:21&lt;br /&gt;
||ഇതിനു കീഴില് നമുക്ക് Recently Used കൂടാതെ Available for Use slide എന്ന രൂപമാതൃകകള് കാണാന് സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:27&lt;br /&gt;
||നിങ്ങളുടെ ആഗ്രഹമനുസരിച്ച് ഏതിലെങ്കിലും Click ചെയ്യുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:31&lt;br /&gt;
||Workspace pane ലെ slide ഡിസൈൻന്റെ മാറ്റം ശ്രദ്ധിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:35&lt;br /&gt;
||slide ഡിസൈൻ മാറ്റാന് എത്രയെളുപ്പമാണ് എന്ന് കാണുക?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:39&lt;br /&gt;
||നിങ്ങൾ സൃഷ്ടിച്ച ഡിസൈൻ നിങ്ങളുടെ slideന്റെ പശ്ചാത്തലമായി കൊടുക്കാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:45&lt;br /&gt;
||അടുത്തതായി നമ്മള് Outline view കാണും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:47&lt;br /&gt;
||നിങ്ങള്ക്ക് ഈ കാഴ്ചയിലേയ്ക്ക് View കൂടാതെ Outline ല് click ചെയ്തു പോകാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:54 &lt;br /&gt;
||അല്ലെങ്കില് Outline tab ല് click ചെയ്തും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:57&lt;br /&gt;
||ഈ കാഴ്ചയില് ഇവിടെ, slides ക്രമീകരിച്ചിരിക്കുന്നത് ഉള്ളടക്ക പട്ടിക പോലെ ഒന്നിനു ചുവടെ മറ്റൊന്ന് എന്ന ക്രമത്തിലാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:05 &lt;br /&gt;
||ഇവ Slide Headings ആണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:08&lt;br /&gt;
||slide heading Overview ഹൈലൈറ്റ് ചെയ്യപ്പെട്ടിരിക്കുന്നത് ശ്രദ്ധിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:12&lt;br /&gt;
||Outline tab തിരഞ്ഞെടുത്തപ്പോള് നമ്മള് Overview സ്ലൈഡിലായിരുന്നതിനാലാണ് ഇത് സംഭവിച്ചത്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:18&lt;br /&gt;
||icons ഇവിടെ bullet points പോയിന്റുകളുടെ രൂപത്തിലും നിങ്ങള്ക്ക് കാണാം.  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:23 &lt;br /&gt;
||നിങ്ങള് ഈ bullet points കള്ക്ക് മുകളിലൂടെ mouse നീക്കുമ്പോള് cursor ഒരു കൈ മാതൃകയിലേയ്ക്ക് മാറുന്നത് നിങ്ങള്ക്ക് കാണാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:29&lt;br /&gt;
||നമുക്ക് തുടര്ന്ന് ഈ ഇനങ്ങളെ മുകളിലേയ്ക്കോ താഴേയ്ക്കോ മാറ്റുകയോ ഒരു slide ന് അകത്തുതന്നെ പുനഃക്രമീകരിക്കുകയോ ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:38&lt;br /&gt;
||അല്ലെങ്കില് സ്ലയ്ടുകളുടെ കുറുകെ.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:40&lt;br /&gt;
||നമുക്ക് ഈ മാറ്റങ്ങള് CTRL കൂടാതെ Z അമര്ത്തിക്കൊണ്ട് ഇല്ലാതാക്കാം, അതുവഴി നമ്മുടെ presentation അതിന്റെ അസല് രൂപത്തില് കാണാന് സാധിക്കും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|| Slide Sorter ഉപയോഗിച്ച് നമുക്ക് സ്ലയിട്സ്  റീഅറേഞ്ച്  ചെയ്യാം&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:53&lt;br /&gt;
||View കൂടാതെ Slide Sorter എന്നിവയില് click ചെയ്ത് നമുക്ക് Slide Sorter view യിലേയ്ക്ക് മാറാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:00&lt;br /&gt;
||അല്ലെങ്കില് Slide Sorter tab ല് click ചെയ്തുകൊണ്ട്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:04 &lt;br /&gt;
||ഈ view നിങ്ങള്ക്ക് ആഗ്രഹമുള്ള രീതിയില് slides പുനഃക്രമീകരിക്കുന്നതിന് സഹായിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:08&lt;br /&gt;
||ഉദാഹരണത്തിന് - slide നമ്പര് 9, 10 എന്നിവ മാറ്റാന്, slide നമ്പര് 10 ല് click ചെയ്യുക &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||എന്നിട്ട് slide നെ slide നമ്പര് 9 ന് മുമ്പിലേയ്ക്ക് ഇഴയ്ക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:18&lt;br /&gt;
||ഇനി mouse button വിടുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:22&lt;br /&gt;
||slides പരസ്പരം സ്ഥാനം മാറുന്നു!&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:26&lt;br /&gt;
||Notes view ല്, നിങ്ങള്ക്ക് നിങ്ങളുടെ presentation നെ സഹായിക്കുന്ന കുറിപ്പുകള് എഴുതാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:31&lt;br /&gt;
||Notes view യിലേയ്ക്ക് പോകാന്, View തുടര്ന്ന് Notes Page ല് click ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:36&lt;br /&gt;
||നിങ്ങള്ക്ക് Notes tab ലും click ചെയ്യാവുന്നതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:39 &lt;br /&gt;
||Slides pane ല് നിന്ന് ‘Development up to present’ എന്ന slide തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:44 &lt;br /&gt;
||notes ഭാഗത്ത് ചില വാക്കുകൾ ടൈപ്പ് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:49&lt;br /&gt;
||നിങ്ങളുടെ slide കള് projector ല് കാണുമ്പോള്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||നിങ്ങള്ക്കപ്പോഴും മോണിറ്ററില് notes കാണാന് സാധിക്കും, പക്ഷെ നിങ്ങളുടെ കാഴ്ചക്കാര്ക്ക് അവ കാണാനും സാധിക്കില്ല.കാണുകയുമില്ല&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:58 &lt;br /&gt;
||ഇനി നമുക്ക് Normal tab ല് click ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:01&lt;br /&gt;
||നമുക്ക് വലതുഭാഗത്തെ Tasks pane, Layout section ല് presentation ന്റെ  layout മാറ്റാവുന്നതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:08&lt;br /&gt;
||Tasks pane കാണിക്കാനോ മറയ്ക്കാനോ, &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:12&lt;br /&gt;
||View കൂടാതെ Tasks Pane click ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:14 &lt;br /&gt;
||ഇത് Tasks pane കാണിക്കുകയോ മറയ്ക്കുകയോ ചെയ്യും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:18&lt;br /&gt;
||ഒരു slide ന്റെ layout മാറ്റാന് Layout section ഉപയോഗിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:23&lt;br /&gt;
||Development up to present എന്നു പേരായ slide തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:26&lt;br /&gt;
||Layout section &amp;gt;&amp;gt; ല് നിന്ന് Title content ഉള്ളടക്കത്തിനു മുകളില് തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:33 &lt;br /&gt;
||ഇത് slide ന്റെ layout മാറ്റുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:37&lt;br /&gt;
||ഇതോടെ ഈ tutorial അവസാനിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:40&lt;br /&gt;
||ചുരുക്കത്തില് നമ്മള് പഠിച്ചത് - View options കൂടാതെ അവയുടെ ഉപയോഗങ്ങളും കൂടാതെ Master Pages ഉം ആണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:46 &lt;br /&gt;
||ഈ കോമ്പ്രഹന്ഷന് ടെസ്റ്റ് അസൈന്മെന്റ് പരീക്ഷിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:49 &lt;br /&gt;
||ഒരു പുതിയ presentation ശ്രമിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:52&lt;br /&gt;
||കരിനീല പശ്ചാത്തലവും ഇളം നീല ശീര്ഷക മെഖലയുമായി ഒരു മാസ്റ്റര് സൃഷ്ടിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:58&lt;br /&gt;
||താഴെക്കാണുന്ന ലിങ്കില് ലഭ്യമായ video കാണുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:02 &lt;br /&gt;
||ഇതോടെ Spoken Tutorial project അവസാനിച്ചു   ഇത് സ്പോകെൻ ടുടോറിയൽ പ്രോജെക്റ്റ് സമ്മറയിസ് ചെയ്യുന്നു&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:05&lt;br /&gt;
||നിങ്ങള്ക്ക് മികച്ച bandwidth ഇല്ലെങ്കില് നിങ്ങള്ക്കത് ഡൌണ്ലോഡ് ചെയ്ത് കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:12&lt;br /&gt;
||spoken tutorials ഉപയോഗിച്ച് വര്ക്ഷോപ്പുകള് നടത്തുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:15&lt;br /&gt;
||ഓണ്ലൈന് പരീക്ഷ ജയിക്കുന്നവര്ക്ക് സാക്ഷ്യപത്രങ്ങള് നല്കുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:19&lt;br /&gt;
||കൂടുതല് വിശദാംശങ്ങള്ക്കായി contact@spoken-tutorial.org ലേയ്ക്ക് എഴുതുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:26&lt;br /&gt;
||Spoken Tutorial Project എന്നത് Talk to a Teacher project ന്റെ ഒരു ഭാഗമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:30 &lt;br /&gt;
||ഇതിനെ പിന്തുണയ്ക്കുന്നത് National Mission on Education, ICT, MHRD, Government of India മുഖാന്തരമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:38&lt;br /&gt;
||ഇതിനെക്കുറിച്ചുള്ള കൂടുതല് വിവരങ്ങള് http://spokentutorial.org/NMEICT-Intro യില് ലഭ്യമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:49&lt;br /&gt;
||ഈ tutorial സമാഹരിച്ചത് ശാലു  ശങ്കർ, IIT Bombay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:55 &lt;br /&gt;
||ഞങ്ങളോടൊപ്പം ചേർന്നതിന്  നന്ദി&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam</id>
		<title>LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam"/>
				<updated>2014-03-24T06:32:48Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|VISUAL CUE&lt;br /&gt;
||NARRATION&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:00&lt;br /&gt;
||LibreOffice Impress-Viewing a Presentation നെക്കുറിച്ചുള്ള സ്പോകെൻ tutorial ലേയ്ക്ക് സ്വാഗതം &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:05 &lt;br /&gt;
||ഈ tutorial ല് നമ്മൾ View options നെക്കുറിച്ചും അതിന്റെ ഉപയോഗത്തെക്കുറിച്ചും കൂടാതെ അവയുടെ Master Pages നെക്കുറിച്ചും പഠിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:13 &lt;br /&gt;
||നമ്മളിവിടെ ഉപയോഗിക്കുന്നത് Ubuntu Linux 10.04 കൂടാതെ LibreOffice Suite പതിപ്പ് 3.3.4. എന്നിവയാണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:22&lt;br /&gt;
||നമുക്കാദ്യം ഡബിള് ക്ലിക്ക് ചെയ്ത് നമ്മുടെ presentation , “Sample Impress” തുറക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:27&lt;br /&gt;
||നിങ്ങള്ക്ക് ഒരുപാട് മെച്ചപ്പെട്ട presentation തയ്യാറാക്കാന് സഹായിക്കുന്ന ഒരുപാട് ഓപ്ഷനുകള് LibreOffice Impress ലുണ്ട്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:34&lt;br /&gt;
||നിങ്ങള് LibreOffice Impress തുറക്കുമ്പോള് സ്ഥിരസ്ഥിതിയായി കാഴ്ചയ്ക്ക്  ഡിഫാൾട്ട്  ആയി ഇങ്ങനെയിരിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:41 &lt;br /&gt;
||ഇതിനെ Normal view എന്ന് വിളിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:43&lt;br /&gt;
||presentation മറ്റേതെങ്കിലും വ്യൂവില് ആയിരിക്കുമ്പോള്,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:48 &lt;br /&gt;
||നിങ്ങള്ക്ക് Normal tabല് ക്ലിക്ക് ചെയ്ത് normal view യിലേയ്ക്ക് തിരിച്ചുപോകാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:53 &lt;br /&gt;
||അല്ലെങ്കില് View കൂടാതെ Normal ഉം ക്ലിക്ക് ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:57&lt;br /&gt;
||normal view യില്, നിങ്ങള്ക്ക് slides സൃഷ്ടിക്കാനും എഡിറ്റ് ചെയ്യാനും സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:02&lt;br /&gt;
||ഉദാഹരണത്തിന് നമുക്ക് സ്ലൈഡുകളുടെ ഡിസൈൻ മാറ്റാന് സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:05&lt;br /&gt;
||ഇത് ചെയ്യാന്, Overviewഎന്ന ശീര്ഷകമുള്ള slideല് പോവുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:09 &lt;br /&gt;
||Tasks pane ല് വലത് side ല് Master Pages വിഭാഗത്തില് “Used in This Presentation” ന് കീഴില് നമുക്ക് slide രൂപമാതൃകയായ prs strategy കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:21&lt;br /&gt;
||ഇതിനു കീഴില് നമുക്ക് Recently Used കൂടാതെ Available for Use slide എന്ന രൂപമാതൃകകള് കാണാന് സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:27&lt;br /&gt;
||നിങ്ങളുടെ ആഗ്രഹമനുസരിച്ച് ഏതിലെങ്കിലും Click ചെയ്യുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:31&lt;br /&gt;
||Workspace pane ലെ slide ഡിസൈൻന്റെ മാറ്റം ശ്രദ്ധിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:35&lt;br /&gt;
||slide ഡിസൈൻ മാറ്റാന് എത്രയെളുപ്പമാണ് എന്ന് കാണുക?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:39&lt;br /&gt;
||നിങ്ങൾ സൃഷ്ടിച്ച ഡിസൈൻ നിങ്ങളുടെ slideന്റെ പശ്ചാത്തലമായി കൊടുക്കാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:45&lt;br /&gt;
||അടുത്തതായി നമ്മള് Outline view കാണും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:47&lt;br /&gt;
||നിങ്ങള്ക്ക് ഈ കാഴ്ചയിലേയ്ക്ക് View കൂടാതെ Outline ല് click ചെയ്തു പോകാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:54 &lt;br /&gt;
||അല്ലെങ്കില് Outline tab ല് click ചെയ്തുകൊണ്ട്. ചെയ്തും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:57&lt;br /&gt;
||ഈ കാഴ്ചയില് ഇവിടെ, slides ക്രമീകരിച്ചിരിക്കുന്നത് ഉള്ളടക്ക പട്ടിക പോലെ ഒന്നിനു ചുവടെ മറ്റൊന്ന് എന്ന ക്രമത്തിലാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:05 &lt;br /&gt;
||ഇവ Slide Headings ആണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:08&lt;br /&gt;
||slide heading Overview ഹൈലൈറ്റ് ചെയ്യപ്പെട്ടിരിക്കുന്നത് ശ്രദ്ധിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:12&lt;br /&gt;
||Outline tab തിരഞ്ഞെടുത്തപ്പോള് നമ്മള് Overview സ്ലൈഡിലായിരുന്നതിനാലാണ് ഇത് സംഭവിച്ചത്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:18&lt;br /&gt;
||icons ഇവിടെ bullet points പോയിന്റുകളുടെ രൂപത്തിലും നിങ്ങള്ക്ക് കാണാം.  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:23 &lt;br /&gt;
||നിങ്ങള് ഈ bullet points കള്ക്ക് മുകളിലൂടെ mouse നീക്കുമ്പോള് cursor ഒരു കൈ മാതൃകയിലേയ്ക്ക് മാറുന്നത് നിങ്ങള്ക്ക് കാണാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:29&lt;br /&gt;
||നമുക്ക് തുടര്ന്ന് ഈ ഇനങ്ങളെ മുകളിലേയ്ക്കോ താഴേയ്ക്കോ മാറ്റുകയോ ഒരു slide ന് അകത്തുതന്നെ പുനഃക്രമീകരിക്കുകയോ ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:38&lt;br /&gt;
||അല്ലെങ്കില് സ്ലയ്ടുകളുടെ കുറുകെ.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:40&lt;br /&gt;
||നമുക്ക് ഈ മാറ്റങ്ങള് CTRL കൂടാതെ Z അമര്ത്തിക്കൊണ്ട് ഇല്ലാതാക്കാം, അതുവഴി നമ്മുടെ presentation അതിന്റെ അസല് രൂപത്തില് കാണാന് സാധിക്കും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|| Slide Sorter ഉപയോഗിച്ച് നമുക്ക് സ്ലയിട്സ്  റീഅറേഞ്ച്  ചെയ്യാം&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:53&lt;br /&gt;
||View കൂടാതെ Slide Sorter എന്നിവയില് click ചെയ്ത് നമുക്ക് Slide Sorter view യിലേയ്ക്ക് മാറാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:00&lt;br /&gt;
||അല്ലെങ്കില് Slide Sorter tab ല് click ചെയ്തുകൊണ്ട്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:04 &lt;br /&gt;
||ഈ view നിങ്ങള്ക്ക് ആഗ്രഹമുള്ള രീതിയില് slides പുനഃക്രമീകരിക്കുന്നതിന് സഹായിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:08&lt;br /&gt;
||ഉദാഹരണത്തിന് - slide നമ്പര് 9, 10 എന്നിവ മാറ്റാന്, slide നമ്പര് 10 ല് click ചെയ്യുക &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||എന്നിട്ട് slide നെ slide നമ്പര് 9 ന് മുമ്പിലേയ്ക്ക് ഇഴയ്ക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:18&lt;br /&gt;
||ഇനി mouse button വിടുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:22&lt;br /&gt;
||slides പരസ്പരം സ്ഥാനം മാറുന്നു!&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:26&lt;br /&gt;
||Notes view ല്, നിങ്ങള്ക്ക് നിങ്ങളുടെ presentation നെ സഹായിക്കുന്ന കുറിപ്പുകള് എഴുതാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:31&lt;br /&gt;
||Notes view യിലേയ്ക്ക് പോകാന്, View തുടര്ന്ന് Notes Page ല് click ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:36&lt;br /&gt;
||നിങ്ങള്ക്ക് Notes tab ലും click ചെയ്യാവുന്നതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:39 &lt;br /&gt;
||Slides pane ല് നിന്ന് ‘Development up to present’ എന്ന slide തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:44 &lt;br /&gt;
||notes ഭാഗത്ത് ചില വാക്കുകൾ ടൈപ്പ് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:49&lt;br /&gt;
||നിങ്ങളുടെ slide കള് projector ല് കാണുമ്പോള്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||നിങ്ങള്ക്കപ്പോഴും മോണിറ്ററില് notes കാണാന് സാധിക്കും, പക്ഷെ നിങ്ങളുടെ കാഴ്ചക്കാര്ക്ക് അവ കാണാനും സാധിക്കില്ല.കാണുകയുമില്ല&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:58 &lt;br /&gt;
||ഇനി നമുക്ക് Normal tab ല് click ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:01&lt;br /&gt;
||നമുക്ക് വലതുഭാഗത്തെ Tasks pane, Layout section ല് presentation ന്റെ  layout മാറ്റാവുന്നതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:08&lt;br /&gt;
||Tasks pane കാണിക്കാനോ മറയ്ക്കാനോ, &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:12&lt;br /&gt;
||View കൂടാതെ Tasks Pane click ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:14 &lt;br /&gt;
||ഇത് Tasks pane കാണിക്കുകയോ മറയ്ക്കുകയോ ചെയ്യും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:18&lt;br /&gt;
||ഒരു slide ന്റെ layout മാറ്റാന് Layout section ഉപയോഗിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:23&lt;br /&gt;
||Development up to present എന്നു പേരായ slide തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:26&lt;br /&gt;
||Layout section &amp;gt;&amp;gt; ല് നിന്ന് Title content ഉള്ളടക്കത്തിനു മുകളില് തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:33 &lt;br /&gt;
||ഇത് slide ന്റെ layout മാറ്റുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:37&lt;br /&gt;
||ഇതോടെ ഈ tutorial അവസാനിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:40&lt;br /&gt;
||ചുരുക്കത്തില് നമ്മള് പഠിച്ചത് - View options കൂടാതെ അവയുടെ ഉപയോഗങ്ങളും കൂടാതെ Master Pages ഉം ആണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:46 &lt;br /&gt;
||ഈ കോമ്പ്രഹന്ഷന് ടെസ്റ്റ് അസൈന്മെന്റ് പരീക്ഷിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:49 &lt;br /&gt;
||ഒരു പുതിയ presentation ശ്രമിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:52&lt;br /&gt;
||കരിനീല പശ്ചാത്തലവും ഇളം നീല ശീര്ഷക മെഖലയുമായി ഒരു മാസ്റ്റര് സൃഷ്ടിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:58&lt;br /&gt;
||താഴെക്കാണുന്ന ലിങ്കില് ലഭ്യമായ video കാണുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:02 &lt;br /&gt;
||ഇതോടെ Spoken Tutorial project അവസാനിച്ചു   ഇത് സ്പോകെൻ ടുടോറിയൽ പ്രോജെക്റ്റ് സമ്മറയിസ് ചെയ്യുന്നു&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:05&lt;br /&gt;
||നിങ്ങള്ക്ക് മികച്ച bandwidth ഇല്ലെങ്കില് നിങ്ങള്ക്കത് ഡൌണ്ലോഡ് ചെയ്ത് കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:12&lt;br /&gt;
||spoken tutorials ഉപയോഗിച്ച് വര്ക്ഷോപ്പുകള് നടത്തുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:15&lt;br /&gt;
||ഓണ്ലൈന് പരീക്ഷ ജയിക്കുന്നവര്ക്ക് സാക്ഷ്യപത്രങ്ങള് നല്കുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:19&lt;br /&gt;
||കൂടുതല് വിശദാംശങ്ങള്ക്കായി contact@spoken-tutorial.org ലേയ്ക്ക് എഴുതുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:26&lt;br /&gt;
||Spoken Tutorial Project എന്നത് Talk to a Teacher project ന്റെ ഒരു ഭാഗമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:30 &lt;br /&gt;
||ഇതിനെ പിന്തുണയ്ക്കുന്നത് National Mission on Education, ICT, MHRD, Government of India മുഖാന്തരമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:38&lt;br /&gt;
||ഇതിനെക്കുറിച്ചുള്ള കൂടുതല് വിവരങ്ങള് http://spokentutorial.org/NMEICT-Intro യില് ലഭ്യമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:49&lt;br /&gt;
||ഈ tutorial സമാഹരിച്ചത് ശാലു  ശങ്കർ, IIT Bombay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:55 &lt;br /&gt;
||ഞങ്ങളോടൊപ്പം ചേർന്നതിന്  നന്ദി&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam</id>
		<title>LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Impress/C2/Viewing-a-Presentation-Document/Malayalam"/>
				<updated>2014-03-24T06:31:13Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|VISUAL CUE&lt;br /&gt;
||NARRATION&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:00&lt;br /&gt;
||LibreOffice Impress-Viewing a Presentation നെക്കുറിച്ചുള്ള സ്പോകെൻ tutorial ലേയ്ക്ക് സ്വാഗതം &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:05 &lt;br /&gt;
||ഈ tutorial ല് നമ്മൾ View options നെക്കുറിച്ചും അതിന്റെ ഉപയോഗത്തെക്കുറിച്ചും കൂടാതെ അവയുടെ Master Pages നെക്കുറിച്ചും പഠിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:13 &lt;br /&gt;
||നമ്മളിവിടെ ഉപയോഗിക്കുന്നത് Ubuntu Linux 10.04 കൂടാതെ LibreOffice Suite പതിപ്പ് 3.3.4. എന്നിവയാണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:22&lt;br /&gt;
||നമുക്കാദ്യം ഡബിള് ക്ലിക്ക് ചെയ്ത് നമ്മുടെ presentation , “Sample Impress” തുറക്കാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:27&lt;br /&gt;
||നിങ്ങള്ക്ക് ഒരുപാട് മെച്ചപ്പെട്ട presentation തയ്യാറാക്കാന് സഹായിക്കുന്ന ഒരുപാട് ഓപ്ഷനുകള് LibreOffice Impress ലുണ്ട്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:34&lt;br /&gt;
||നിങ്ങള് LibreOffice Impress തുറക്കുമ്പോള് സ്ഥിരസ്ഥിതിയായി കാഴ്ചയ്ക്ക്  ഡിഫാൾട്ട്  ആയി ഇങ്ങനെയിരിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:41 &lt;br /&gt;
||ഇതിനെ Normal view എന്ന് വിളിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:43&lt;br /&gt;
||presentation മറ്റേതെങ്കിലും വ്യൂവില് ആയിരിക്കുമ്പോള്,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:48 &lt;br /&gt;
||നിങ്ങള്ക്ക് Normal tabല് ക്ലിക്ക് ചെയ്ത് normal view യിലേയ്ക്ക് തിരിച്ചുപോകാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:53 &lt;br /&gt;
||അല്ലെങ്കില് View കൂടാതെ Normal ഉം ക്ലിക്ക് ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:57&lt;br /&gt;
||normal view യില്, നിങ്ങള്ക്ക് slides സൃഷ്ടിക്കാനും എഡിറ്റ് ചെയ്യാനും സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:02&lt;br /&gt;
||ഉദാഹരണത്തിന് നമുക്ക് സ്ലൈഡുകളുടെ ഡിസൈൻ മാറ്റാന് സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:05&lt;br /&gt;
||ഇത് ചെയ്യാന്, Overviewഎന്ന ശീര്ഷകമുള്ള slideല് പോവുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:09 &lt;br /&gt;
||Tasks pane ല് വലത് side ല് Master Pages വിഭാഗത്തില് “Used in This Presentation” ന് കീഴില് നമുക്ക് slide രൂപമാതൃകയായ prs strategy കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:21&lt;br /&gt;
||ഇതിനു കീഴില് നമുക്ക് Recently Used കൂടാതെ Available for Use slide എന്ന രൂപമാതൃകകള് കാണാന് സാധിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:27&lt;br /&gt;
||നിങ്ങളുടെ ആഗ്രഹമനുസരിച്ച് ഏതിലെങ്കിലും Click ചെയ്യുക. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:31&lt;br /&gt;
||Workspace pane ലെ slide ഡിസൈൻന്റെ മാറ്റം ശ്രദ്ധിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:35&lt;br /&gt;
||slide ഡിസൈൻ മാറ്റാന് എത്രയെളുപ്പമാണ് എന്ന് കാണുക?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:39&lt;br /&gt;
||നിങ്ങളുടെ slides നായി പശ്ചാത്തലമായി സൃഷ്ടിച്ച രൂപമാതൃകകളും ചേര്ക്കാവുന്നതാണ്. &lt;br /&gt;
നിങ്ങൾ സൃഷ്ടിച്ച ഡിസൈൻ നിങ്ങളുടെ slideന്റെ പശ്ചാത്തലമായി കൊടുക്കാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:45&lt;br /&gt;
||അടുത്തതായി നമ്മള് Outline view കാണും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:47&lt;br /&gt;
||നിങ്ങള്ക്ക് ഈ കാഴ്ചയിലേയ്ക്ക് View കൂടാതെ Outline ല് click ചെയ്തു പോകാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:54 &lt;br /&gt;
||അല്ലെങ്കില് Outline tab ല് click ചെയ്തുകൊണ്ട്. ചെയ്തും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:57&lt;br /&gt;
||ഈ കാഴ്ചയില് ഇവിടെ, slides ക്രമീകരിച്ചിരിക്കുന്നത് ഉള്ളടക്ക പട്ടിക പോലെ ഒന്നിനു ചുവടെ മറ്റൊന്ന് എന്ന ക്രമത്തിലാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:05 &lt;br /&gt;
||ഇവ Slide Headings ആണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:08&lt;br /&gt;
||slide heading Overview ഹൈലൈറ്റ് ചെയ്യപ്പെട്ടിരിക്കുന്നത് ശ്രദ്ധിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:12&lt;br /&gt;
||Outline tab തിരഞ്ഞെടുത്തപ്പോള് നമ്മള് Overview സ്ലൈഡിലായിരുന്നതിനാലാണ് ഇത് സംഭവിച്ചത്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:18&lt;br /&gt;
||icons ഇവിടെ bullet points പോയിന്റുകളുടെ രൂപത്തിലും നിങ്ങള്ക്ക് കാണാം.  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:23 &lt;br /&gt;
||നിങ്ങള് ഈ bullet points കള്ക്ക് മുകളിലൂടെ mouse നീക്കുമ്പോള് cursor ഒരു കൈ മാതൃകയിലേയ്ക്ക് മാറുന്നത് നിങ്ങള്ക്ക് കാണാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:29&lt;br /&gt;
||നമുക്ക് തുടര്ന്ന് ഈ ഇനങ്ങളെ മുകളിലേയ്ക്കോ താഴേയ്ക്കോ മാറ്റുകയോ ഒരു slide ന് അകത്തുതന്നെ പുനഃക്രമീകരിക്കുകയോ ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:38&lt;br /&gt;
||അല്ലെങ്കില് സ്ലയ്ടുകളുടെ കുറുകെ.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:40&lt;br /&gt;
||നമുക്ക് ഈ മാറ്റങ്ങള് CTRL കൂടാതെ Z അമര്ത്തിക്കൊണ്ട് ഇല്ലാതാക്കാം, അതുവഴി നമ്മുടെ presentation അതിന്റെ അസല് രൂപത്തില് കാണാന് സാധിക്കും&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|| Slide Sorter ഉപയോഗിച്ച് നമുക്ക് സ്ലയിട്സ്  റീഅറേഞ്ച്  ചെയ്യാം&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:53&lt;br /&gt;
||View കൂടാതെ Slide Sorter എന്നിവയില് click ചെയ്ത് നമുക്ക് Slide Sorter view യിലേയ്ക്ക് മാറാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:00&lt;br /&gt;
||അല്ലെങ്കില് Slide Sorter tab ല് click ചെയ്തുകൊണ്ട്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:04 &lt;br /&gt;
||ഈ view നിങ്ങള്ക്ക് ആഗ്രഹമുള്ള രീതിയില് slides പുനഃക്രമീകരിക്കുന്നതിന് സഹായിക്കും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:08&lt;br /&gt;
||ഉദാഹരണത്തിന് - slide നമ്പര് 9, 10 എന്നിവ മാറ്റാന്, slide നമ്പര് 10 ല് click ചെയ്യുക &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||എന്നിട്ട് slide നെ slide നമ്പര് 9 ന് മുമ്പിലേയ്ക്ക് ഇഴയ്ക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:18&lt;br /&gt;
||ഇനി mouse button വിടുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:22&lt;br /&gt;
||slides പരസ്പരം സ്ഥാനം മാറുന്നു!&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:26&lt;br /&gt;
||Notes view ല്, നിങ്ങള്ക്ക് നിങ്ങളുടെ presentation നെ സഹായിക്കുന്ന കുറിപ്പുകള് എഴുതാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:31&lt;br /&gt;
||Notes view യിലേയ്ക്ക് പോകാന്, View തുടര്ന്ന് Notes Page ല് click ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:36&lt;br /&gt;
||നിങ്ങള്ക്ക് Notes tab ലും click ചെയ്യാവുന്നതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:39 &lt;br /&gt;
||Slides pane ല് നിന്ന് ‘Development up to present’ എന്ന slide തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:44 &lt;br /&gt;
||notes ഭാഗത്ത് ചില വാക്കുകൾ ടൈപ്പ് ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:49&lt;br /&gt;
||നിങ്ങളുടെ slide കള് projector ല് കാണുമ്പോള്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
||നിങ്ങള്ക്കപ്പോഴും മോണിറ്ററില് notes കാണാന് സാധിക്കും, പക്ഷെ നിങ്ങളുടെ കാഴ്ചക്കാര്ക്ക് അവ കാണാനും സാധിക്കില്ല.കാണുകയുമില്ല&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:58 &lt;br /&gt;
||ഇനി നമുക്ക് Normal tab ല് click ചെയ്യാം.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:01&lt;br /&gt;
||നമുക്ക് വലതുഭാഗത്തെ Tasks pane, Layout section ല് presentation ന്റെ  layout മാറ്റാവുന്നതാണ്.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:08&lt;br /&gt;
||Tasks pane കാണിക്കാനോ മറയ്ക്കാനോ, &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:12&lt;br /&gt;
||View കൂടാതെ Tasks Pane click ചെയ്യുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:14 &lt;br /&gt;
||ഇത് Tasks pane കാണിക്കുകയോ മറയ്ക്കുകയോ ചെയ്യും.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:18&lt;br /&gt;
||ഒരു slide ന്റെ layout മാറ്റാന് Layout section ഉപയോഗിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:23&lt;br /&gt;
||Development up to present എന്നു പേരായ slide തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:26&lt;br /&gt;
||Layout section &amp;gt;&amp;gt; ല് നിന്ന് Title content ഉള്ളടക്കത്തിനു മുകളില് തിരഞ്ഞെടുക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:33 &lt;br /&gt;
||ഇത് slide ന്റെ layout മാറ്റുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:37&lt;br /&gt;
||ഇതോടെ ഈ tutorial അവസാനിക്കുന്നു.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:40&lt;br /&gt;
||ചുരുക്കത്തില് നമ്മള് പഠിച്ചത് - View options കൂടാതെ അവയുടെ ഉപയോഗങ്ങളും കൂടാതെ Master Pages ഉം ആണ്. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:46 &lt;br /&gt;
||ഈ കോമ്പ്രഹന്ഷന് ടെസ്റ്റ് അസൈന്മെന്റ് പരീക്ഷിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:49 &lt;br /&gt;
||ഒരു പുതിയ presentation ശ്രമിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:52&lt;br /&gt;
||കരിനീല പശ്ചാത്തലവും ഇളം നീല ശീര്ഷക മെഖലയുമായി ഒരു മാസ്റ്റര് സൃഷ്ടിക്കുക.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:58&lt;br /&gt;
||താഴെക്കാണുന്ന ലിങ്കില് ലഭ്യമായ video കാണുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:02 &lt;br /&gt;
||ഇതോടെ Spoken Tutorial project അവസാനിച്ചു   ഇത് സ്പോകെൻ ടുടോറിയൽ പ്രോജെക്റ്റ് സമ്മറയിസ് ചെയ്യുന്നു&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:05&lt;br /&gt;
||നിങ്ങള്ക്ക് മികച്ച bandwidth ഇല്ലെങ്കില് നിങ്ങള്ക്കത് ഡൌണ്ലോഡ് ചെയ്ത് കാണാം&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:12&lt;br /&gt;
||spoken tutorials ഉപയോഗിച്ച് വര്ക്ഷോപ്പുകള് നടത്തുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:15&lt;br /&gt;
||ഓണ്ലൈന് പരീക്ഷ ജയിക്കുന്നവര്ക്ക് സാക്ഷ്യപത്രങ്ങള് നല്കുന്നു&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:19&lt;br /&gt;
||കൂടുതല് വിശദാംശങ്ങള്ക്കായി contact@spoken-tutorial.org ലേയ്ക്ക് എഴുതുക&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:26&lt;br /&gt;
||Spoken Tutorial Project എന്നത് Talk to a Teacher project ന്റെ ഒരു ഭാഗമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:30 &lt;br /&gt;
||ഇതിനെ പിന്തുണയ്ക്കുന്നത് National Mission on Education, ICT, MHRD, Government of India മുഖാന്തരമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:38&lt;br /&gt;
||ഇതിനെക്കുറിച്ചുള്ള കൂടുതല് വിവരങ്ങള് http://spokentutorial.org/NMEICT-Intro യില് ലഭ്യമാണ്&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:49&lt;br /&gt;
||ഈ tutorial സമാഹരിച്ചത് ശാലു  ശങ്കർ, IIT Bombay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:55 &lt;br /&gt;
||ഞങ്ങളോടൊപ്പം ചേർന്നതിന്  നന്ദി&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C3/Subclassing-and-Method-Overriding/English</id>
		<title>Java/C3/Subclassing-and-Method-Overriding/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C3/Subclassing-and-Method-Overriding/English"/>
				<updated>2014-03-12T07:33:50Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: Created page with ''''Title of script''': Subclassing and Method overriding  '''Author: arya '''  '''Keywords: '''subclassing, extends keyword, overriding, method overriding, Java, Eclipse IDE, vid…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Subclassing and Method overriding&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: '''subclassing, extends keyword, overriding, method overriding, Java, Eclipse IDE, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 1'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken-tutorial on''' Subclassing and Method overriding.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 2'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn about :&lt;br /&gt;
&lt;br /&gt;
* '''subclassing'''&lt;br /&gt;
* '''extends '''keyword and&lt;br /&gt;
* '''method overriding'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 3'''&lt;br /&gt;
&lt;br /&gt;
'''Software Requirements'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Here we are using&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu''' '''Linux '''version 12.04&lt;br /&gt;
* '''JDK '''1.7&lt;br /&gt;
* '''Eclipse '''4.3.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 4'''&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| To follow this tutorial, you must have knowledge of&lt;br /&gt;
&lt;br /&gt;
'''basics of Java and Eclipse IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant '''Java '''tutorials, please visit our website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 5'''&lt;br /&gt;
&lt;br /&gt;
'''Subclassing'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| First of all, we will learn what '''subclassing '''is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* It is a way to create a new '''class''' from an existing '''class.'''&lt;br /&gt;
&lt;br /&gt;
* The new class created is called '''subclass '''or''' derived class '''or''' child class.'''&lt;br /&gt;
&lt;br /&gt;
* The already existing class is called '''superclass '''or''' base class '''or''' parent class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Go to the '''Eclipse''' '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let me show you how to create a '''sub-class. '''&lt;br /&gt;
&lt;br /&gt;
So, go to the '''Eclipse''' '''IDE.''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''Employee class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public class Employee {'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have already created a '''class '''called '''Employee.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''variables'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public String name&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''public String email_address&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It has '''variables name '''and '''email_address.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''setter '''and '''getter methods.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public void setName(String newName) {'''&lt;br /&gt;
&lt;br /&gt;
''' name&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;newName&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public String getName() {'''&lt;br /&gt;
&lt;br /&gt;
''' return name&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public void setEmail(String newEmail) {'''&lt;br /&gt;
&lt;br /&gt;
''' email_address&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;newEmail&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public String getEmail() {'''&lt;br /&gt;
&lt;br /&gt;
''' return email_address&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It also has the '''setter '''and '''getter methods '''for the '''class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''method getDetails().'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public String getDetails() '''&lt;br /&gt;
&lt;br /&gt;
'''{'''&lt;br /&gt;
&lt;br /&gt;
''' '''&lt;br /&gt;
&lt;br /&gt;
'''return(&amp;quot;Name: &amp;quot; + getName() + &amp;quot;\n&amp;quot; + &amp;quot;Email: &amp;quot; + getEmail());'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
''' '''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It has a '''method getDetails().'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This '''method '''returns the '''name '''and''' email_address.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public class Manager {'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come to the '''class '''called '''Manager.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''variables.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public String name&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''public String email_address&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''public String department&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It has '''variables name, email_address '''and '''department.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''name and email_address '''in both the '''Employee '''and '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public String name&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''public String email_address&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that some '''variables''' are common to both '''Employee '''and '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''name '''and''' email_address '''are there in '''Employee class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that its also there in '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Thus, '''Manager class '''can be made a '''subclass''' of '''Employee class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For that, we have to make some changes in the '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''public class Manager extends Employee{'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| After '''public class Manager, '''type '''extends Employee.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''extends keyword.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We use the '''extends keyword '''to create a '''subclass '''from an existing '''class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove '''name, email_address '''from '''Manager class.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the duplicate '''variables '''common to both the '''classes.'''&lt;br /&gt;
&lt;br /&gt;
So, remove '''name '''and''' email_address '''from '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
Also remove '''setter '''and '''getter methods '''of the same.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''variable department.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the '''class Manager, '''we will have only one '''variable department.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''setter '''and '''getter method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public void setDepartment(String newDepartment) {'''&lt;br /&gt;
&lt;br /&gt;
''' department&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;newDepartment&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public String getDepartment() {'''&lt;br /&gt;
&lt;br /&gt;
''' return department&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We also have the '''setter '''and '''getter method '''for '''department.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this way, the '''Manager class '''inherits the members of '''Employee class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This way of extending one '''class '''from another is called '''single inheritance.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open the '''class TestEmployee.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public class TestEmployee {'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have also created another '''class '''named '''TestEmployee.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''object '''of the '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args) {'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Manager manager = new Manager();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the '''main method, '''we will create the '''object '''of the '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So inside the '''main method''', type &lt;br /&gt;
&lt;br /&gt;
'''Manager manager ''equal to''''' '''new Manager parentheses'''.''' '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''manager.setName(&amp;quot;Nikkita Dinesh&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''manager.setEmail(&amp;quot;[mailto:abc@gmail.com abc][mailto:abc@gmail.com @][mailto:abc@gmail.com gmail][mailto:abc@gmail.com .][mailto:abc@gmail.com com]&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''manager.setDepartment(“Accounts”);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next, we will call the '''setter methods '''of the '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type, &lt;br /&gt;
&lt;br /&gt;
'''manager ''dot ''setName ''within brackets and double quotes ''Nikkita Dinesh ''semicolon.'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then type, &lt;br /&gt;
&lt;br /&gt;
'''manager ''dot ''setEmail ''within brackets and double quotes ''[mailto:abc@gmail.com abc][mailto:abc@gmail.com @][mailto:abc@gmail.com gmail][mailto:abc@gmail.com .][mailto:abc@gmail.com com] ''semicolon.'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then type, &lt;br /&gt;
&lt;br /&gt;
'''manager ''dot ''setDepartment ''within brackets and double quotes ''Accounts ''semicolon.'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use any '''name, emailaddress''' and '''department'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(manager.getDetails());'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us call the '''getDetails() method '''using the '''Manager object.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, type &lt;br /&gt;
&lt;br /&gt;
'''System.out.println ''within brackets ''manager ''dot ''getDetails ''parentheses'''''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Run the program.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us run the program.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Name: Nikkita Dinesh'''&lt;br /&gt;
&lt;br /&gt;
'''Email: abc@gmail.com'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that we get the '''output '''as ''':'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Name: Nikkita Dinesh'''&lt;br /&gt;
&lt;br /&gt;
'''Email: abc@gmail.com'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''println statement '''in '''TestEmployee class.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, the '''object '''of '''Manager class '''calls the '''getDetails() method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come to the '''Manager class.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, come to the '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point that there is no '''getDetails() method.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that there is no '''getDetails() method '''here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''Manager class.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| But, we still got the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because, the '''Manager class extends '''the '''Employee class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Manager class '''automatically '''inherits '''the '''variables '''and '''methods '''of the '''Employee class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''getDetails() method '''in the '''Employee class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the '''return statement.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So it checks in the '''parent class '''which is '''Employee.'''&lt;br /&gt;
&lt;br /&gt;
Let us come to the '''Employee class.'''&lt;br /&gt;
&lt;br /&gt;
It finds the '''getDetails() method '''here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that we have not returned the '''department.'''&lt;br /&gt;
&lt;br /&gt;
As a result, it did not print the '''department '''in the '''output.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''getDetails method '''to '''private.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us change the '''getDetails method '''here''' '''to '''private.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to the '''error.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that we get a compilation error in the '''TestEmployee class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It says '''The method getDetails() from the type Employee is not visible.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This means that '''getDetails() method '''cannot be accessed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come to the '''Employee class. '''Highlight '''getDetails() method.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This is because we have declared '''getDetails() method '''as '''private.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 6'''&lt;br /&gt;
&lt;br /&gt;
'''Private members in a superclass'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| * A '''subclass''' does not inherit the private members of its '''superclass'''.&lt;br /&gt;
* '''Subclass '''cannot directly access the private members of the '''superclass.'''&lt;br /&gt;
* However, the superclass can have public or protected methods.&lt;br /&gt;
* These methods can access its private fields.&lt;br /&gt;
* Then the subclass can also access the private fields through these methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change the '''getDetails() method '''from '''private '''to '''public.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, let us change it back to '''public.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us include '''method getDetails '''in the '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type&lt;br /&gt;
&lt;br /&gt;
'''public String getDetails() '''&lt;br /&gt;
&lt;br /&gt;
'''{'''&lt;br /&gt;
&lt;br /&gt;
'''return ( &amp;quot;Name: &amp;quot; + getName() + &amp;quot;\n&amp;quot; + &amp;quot;Email: &amp;quot; +getEmail()+&amp;quot;\n&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''+&amp;quot;Manager of: &amp;quot; + getDepartment());'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This '''method '''will return the '''name, email_address '''and '''department.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type, &lt;br /&gt;
&lt;br /&gt;
'''public String getDetails ''parentheses.'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the method we will return '''name, email''' and '''department'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type'' ''&lt;br /&gt;
&lt;br /&gt;
'''return “Name:” ''plus ''getName() ''plus ''“Email:” ''plus ''getEmail() ''plus ''“Manager of:” ''plus ''getDepartment() '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''method getDetails '''in both '''Employee '''and '''Manager class.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that now, we have the '''method getDetails '''in both '''Employee '''and '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''method declaration '''in both the '''classes.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public String getDetails() '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The '''name, return type '''and '''argument list '''of the''' method '''is same in both the '''classes.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
'''Method overriding'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A''' method '''in the '''subclass '''is said to '''override '''the '''method '''in the '''parent class '''if:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''name'''&lt;br /&gt;
* '''return type'''&lt;br /&gt;
* '''argument list'''&lt;br /&gt;
&lt;br /&gt;
matches exactly.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Come back to the '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''@Override.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before, the '''getDetails() method '''type '''@Override.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is an '''override''' '''annotation.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It''' '''indicates that a method is intended to '''override''' a '''method''' in '''superclass'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us see what an '''annotation '''is.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 8'''&lt;br /&gt;
&lt;br /&gt;
'''Annotation'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Annotations:'''&lt;br /&gt;
&lt;br /&gt;
* start with at sign character(@)&lt;br /&gt;
* provide data about a program &lt;br /&gt;
* have no direct effect on the operation of the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 9'''&lt;br /&gt;
&lt;br /&gt;
'''@Override Annotation'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| If a '''method '''is '''annotated '''with '''@Override compiler '''generates '''error message '''if:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* the''' method''' does '''override''' a '''method''' declared in a '''superclass'''. &lt;br /&gt;
* the '''method signature '''is different in its '''superclass.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the '''annotation.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Come back to the '''Manager class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''at sign character '''indicates the compiler that what follows is an '''annotation.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, it shows that the '''getDetails method '''is '''overridden.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come to the '''TestEmployee class.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us come to the '''TestEmployee class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''TestEmployee'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us '''run '''the '''program.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For that, right click on '''TestEmployee.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Run As.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Run As.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Java Application.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Java Application.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Name: Nikkita Dinesh'''&lt;br /&gt;
&lt;br /&gt;
'''Email:[mailto:abc@gmail.com abc][mailto:abc@gmail.com @][mailto:abc@gmail.com gmail][mailto:abc@gmail.com .][mailto:abc@gmail.com com]&lt;br /&gt;
&lt;br /&gt;
'''Manager of:Accounts'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We get the '''output''' as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Name: Nikkita Dinesh'''&lt;br /&gt;
&lt;br /&gt;
'''Email:[mailto:abc@gmail.com abc][mailto:abc@gmail.com @][mailto:abc@gmail.com gmail][mailto:abc@gmail.com .][mailto:abc@gmail.com com]&lt;br /&gt;
&lt;br /&gt;
'''Manager of:Accounts'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, the '''object '''of the '''Manager class '''calls the '''getDetails() method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But this time, it calls the '''method of Manager class itself.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this way, we override the '''method''' of the '''parent class '''by the '''subclass'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 10'''&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt about&lt;br /&gt;
&lt;br /&gt;
* '''Subclassing'''&lt;br /&gt;
* '''extends '''keyword&lt;br /&gt;
* '''Overriding'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 11'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As an '''assignment'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a '''class Vehicle '''which has a method '''run '''that prints “'''The Vehicle is running.”'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also create a class '''Bike '''which has a method '''run '''that prints “'''The Bike is running safely.”'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The output should be “'''The Bike is running safely.”'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 12'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| is this fine check?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To know more about the Spoken Tutorial Project&lt;br /&gt;
&lt;br /&gt;
- Watch the video available at the following link&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- It summarizes the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- If you do not have good bandwidth, you can download and watch itModifiedok do it in previous tutorial as wellTo know more about the Spoken Tutorial Project&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at the following link&lt;br /&gt;
&lt;br /&gt;
* It summarizes the Spoken Tutorial project&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 13'''&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshop'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
* For more details, please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 14'''&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgement'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* http://spoken-tutorial.org/NMEICT- Intro&lt;br /&gt;
&lt;br /&gt;
This is '''Arya Ratish '''from '''IIT Bombay '''signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Hello-World-Program-in-Eclipse/English-timed</id>
		<title>Java/C2/Hello-World-Program-in-Eclipse/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Hello-World-Program-in-Eclipse/English-timed"/>
				<updated>2014-01-02T11:06:41Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; {| border=1&lt;br /&gt;
|| '''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|  00:01&lt;br /&gt;
|  Welcome to the spoken tutorial on '''HelloWorld in Java on Eclipse'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:06&lt;br /&gt;
| In this tutorial,  we are going to learn,  how to write a simple '''Hello World'''program in '''Java '''using '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:13&lt;br /&gt;
|  For this tutorial we are using  Eclipse 3.7.0 and  Ubuntu 11.10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:20&lt;br /&gt;
|   To follow this tutorial you must have Eclipse installed on your system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:25&lt;br /&gt;
|  And you must know how to create, save and run a file in Eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:30&lt;br /&gt;
| If not, for relevant tutorial please visit our website as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:36&lt;br /&gt;
|   Here is a line of java code that prints the message '''Hello World'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:44&lt;br /&gt;
| Now let us try it on '''Eclipse'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00: 46&lt;br /&gt;
|  Press '''Alt''' ,'''F2''' and in the dialog box  type '''eclipse''' and hit '''enter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:56&lt;br /&gt;
| Click''' Ok''' at the workspace and here we have the Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:09 &lt;br /&gt;
|  Now let us add a '''new project'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:12&lt;br /&gt;
|  click   '''File'''   '''New '''  and select '''Project ''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:19 &lt;br /&gt;
|  In the list of project select '''Java Project '''  and click '''Next.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:26&lt;br /&gt;
|  In the  project name ,Type '''DemoProject ''' (please note that their is no space between '''Demo''' and ''' Project'''D &amp;amp; P are in capital letters)  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:40&lt;br /&gt;
| Click  '''Finish''' at the bottom right corner of the wizards.  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:46&lt;br /&gt;
| '''DemoProject ''' has been created.  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:49&lt;br /&gt;
|Now let us add ''''a new class''' to the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:52&lt;br /&gt;
|'''Right click''' on the ''' Project '''   '''New'''  select '''Class'''.&lt;br /&gt;
This opens a '''New Java Class Portlet'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:59&lt;br /&gt;
|  In the class name  type '''DemoProgram''' and in the method stubs select one that says''' Public, Static,Void main'''. &lt;br /&gt;
|-&lt;br /&gt;
| 02.13&lt;br /&gt;
| Click Finish at the bottom right corner of the wizard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02.20&lt;br /&gt;
|   We can    see that the''' DemoProject has the source directory and a file called '''Demo program.Java''', &lt;br /&gt;
|-&lt;br /&gt;
|02:27&lt;br /&gt;
|This is because every class in Java has to be in its own file. Hence the class Demo Program can exist only in the file ''' Demo program. Java'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:40&lt;br /&gt;
| We  can see that there is very little space for the editor  and the view looks blurred .  Let us minimise the other portlets and here we have the editor .&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:55&lt;br /&gt;
|Notice that this line begins with two slashes which means this line is the comment and has nothing to do with our code.&lt;br /&gt;
|-&lt;br /&gt;
|03:05&lt;br /&gt;
|Let us remove this line. Similarly every thing that is in between '''slash Astrix ''', and '''Astrix slash '''  is also a  comment&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:17	&lt;br /&gt;
|So let us remove this comments also.&lt;br /&gt;
|-&lt;br /&gt;
|03:22&lt;br /&gt;
|Here we have the ''' bare bones ''' of the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:27&lt;br /&gt;
|Now let us add the print statement,''' System.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:35&lt;br /&gt;
|Notice that eclipse gives  a list of all the possible completions.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:38&lt;br /&gt;
|For now we are going to type the command manually;	&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:43&lt;br /&gt;
|Out.println. In brackets in quotes type, '''HelloWorld'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|03:56&lt;br /&gt;
|In java,Every statement  has   to   end with a semicolon.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:59&lt;br /&gt;
|So let us add a semicolon.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:03&lt;br /&gt;
|Here  these are complete '''HelloWorld''' program in ''' Java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:06 &lt;br /&gt;
|Press '''Ctrl + S''' to save&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:11&lt;br /&gt;
|Right click   '''Run as'''   '''java application'''.'''Run''' the code &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:19&lt;br /&gt;
|As  we can see on the output console, the message '''HelloWorld''' has been printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:24&lt;br /&gt;
|Now let us change the ''' World''' to '''Java'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:30&lt;br /&gt;
|Save it with   '''Ctrl + S''' and '''Run''' it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:41 &lt;br /&gt;
|As we can see, the message that is printed now is '''Hello Java'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:45&lt;br /&gt;
|Now let us understand  what each part of code does?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:48&lt;br /&gt;
|The first line  indicates that the  class name is '''DemoProgram'''  and its a '''Public class'''&lt;br /&gt;
|-&lt;br /&gt;
|04:55&lt;br /&gt;
| The second line  indicates that  this is the '''main method'''. In other words the  method from which execution starts with java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:04&lt;br /&gt;
|As we know this is a print statement. &lt;br /&gt;
|-&lt;br /&gt;
|05:07&lt;br /&gt;
|And here is how we write  a   '''HelloWorld'''   program in ''''Java'''&lt;br /&gt;
|-&lt;br /&gt;
|05:14&lt;br /&gt;
|This brings us to the end of the    tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:17&lt;br /&gt;
|In this tutorial we have learnt how to write  a 'HelloWorld' program in java  and also  what each part of  code does in java code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:27&lt;br /&gt;
|As an  assignment for this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:29&lt;br /&gt;
| Create a java class by the name '''Greet'''  it should bring '''Program Successful''' when executed.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:37&lt;br /&gt;
|To know more about the spoken-tutorial project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:39&lt;br /&gt;
|Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:42&lt;br /&gt;
| It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:45&lt;br /&gt;
| If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:51&lt;br /&gt;
|The Spoken Tutorial  Team&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:53&lt;br /&gt;
|Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:55&lt;br /&gt;
|Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:59&lt;br /&gt;
| For more details, please write to  contact@spoken-tutorial.org&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:05&lt;br /&gt;
| Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:09&lt;br /&gt;
|It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
|-&lt;br /&gt;
|06:14&lt;br /&gt;
|More information on this Mission is available at  '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
|-&lt;br /&gt;
|06:19&lt;br /&gt;
|This tutorial has been contributed by '''TalentSprint'''.&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Creating-object/English-timed</id>
		<title>Java/C2/Creating-object/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Creating-object/English-timed"/>
				<updated>2014-01-02T09:09:37Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|| ''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|  00:01&lt;br /&gt;
| Welcome to the spoken tutorial on''' Creating objects.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:05  &lt;br /&gt;
|  In this tutorial we will learn about:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Reference Variables&lt;br /&gt;
* Constructing objects and&lt;br /&gt;
* Memory Allocation for objects&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:13&lt;br /&gt;
|  Here, we are using :&lt;br /&gt;
&lt;br /&gt;
* Ubuntu 11.10&lt;br /&gt;
* JDK 1.6 and&lt;br /&gt;
* Eclipse IDE 3.7.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:23&lt;br /&gt;
|   To follow this tutorial you must know how to create a simple '''class '''using '''Eclipse'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:29&lt;br /&gt;
|If not please see the '''spoken-tutorial''' on these topics available at &lt;br /&gt;
&lt;br /&gt;
'''spoken '''''hyphen''''' tutorial '''''dot '''''org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:38 &lt;br /&gt;
| | We know that''' variables''' and '''methods''' together form the '''members''' of a '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:43&lt;br /&gt;
|To access the members of a class , we need to create an object for the class.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:48	   &lt;br /&gt;
| | Now let us see what an''' object '''is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:52&lt;br /&gt;
|An '''object '''is an '''instance''' of a class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:55&lt;br /&gt;
|Each object consist of '''state''' and '''behavior'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:58&lt;br /&gt;
|Recall the example of '''human being class''' we had discussed in the earlier tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:04&lt;br /&gt;
|Object stores its state in '''fields''' or '''variables.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:08&lt;br /&gt;
|It exposes its behavior through''' methods'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:11&lt;br /&gt;
|  Now let us learn about''' reference variables.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:15&lt;br /&gt;
|We know about the 8 primitive data types in Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:19&lt;br /&gt;
|All other types refer to objects rather than primitives.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:23&lt;br /&gt;
|Variables that refer to objects are '''reference variables'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   01:28&lt;br /&gt;
|  Let us go back to the '''Student class''' which we have already created in the earlier''' tutorial'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:37&lt;br /&gt;
|Now, let me remove the '''main''' '''method''' from this '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:49&lt;br /&gt;
|Now'''Save '''the '''file''' by pressing '''Control '''and '''S '''keys simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:55&lt;br /&gt;
|Now create another '''class''' named '''TestStudent '''inside the same''' project.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:00&lt;br /&gt;
|I have already created it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:03&lt;br /&gt;
|In this '''class '''I have the''' main method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:06&lt;br /&gt;
|No inside the main''' method '''I will create an''' object '''of the''' Student class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:11&lt;br /&gt;
|For that, inside the '''main method''', type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:17&lt;br /&gt;
|'''Student '''''space''''' stud1''' ''equal to'' '''new''' ''space'' '''Student''' ''opening and closing brackets, semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:34&lt;br /&gt;
|Thus we have created an '''object''' of the '''Student class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:37&lt;br /&gt;
|Here,''' Student''' is the name of the''' class '''for which the '''object '''is to be created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:47&lt;br /&gt;
|'''stud1''' is a '''reference variable''' referring to one '''object '''of the '''Student''' class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:53&lt;br /&gt;
|And the''' new keyword''' allocates space for the new '''object''' to be created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:59&lt;br /&gt;
|Please note that '''stud1''' is not the '''object''' of the '''Student class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:03&lt;br /&gt;
|It only holds the reference of the new '''object''' created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:09&lt;br /&gt;
|  Now, let us see what '''stud1''' contains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:13&lt;br /&gt;
|So next line type '''System''' ''dot '''''out''' ''dot '''''println''' within brackets and double quotes '''stud1''' '''contains''' space ''plus '''''stud1''''' ''and then''' '''''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:44&lt;br /&gt;
|Now, '''save '''and''' run '''the '''file TestStudent''' ''dot''''' java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:53&lt;br /&gt;
| We get the output as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:56&lt;br /&gt;
|So here '''Student '''is the name of the '''class '''of the new '''object '''created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:03&lt;br /&gt;
|The second part is the '''memory address''' of the new '''object''' created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:08&lt;br /&gt;
|We can access the '''fields '''and '''methods''' of the '''Student class''' using '''stud1'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:15&lt;br /&gt;
|We will learn about these in the coming tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:18&lt;br /&gt;
|  Now, I will create one more '''object''' of the '''Student class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:24&lt;br /&gt;
|So, I will type '''Student '''''space '''''stud2 '''''equal to '''''new '''''space '''''Student '''''opening and closing brackets semi-colon.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:47&lt;br /&gt;
| Now type next line '''System''''' dot'' '''out '''''dot '''''println''' ''within brackets and double quotes '''''stud2 contains space '''''plus '''''stud2 '''and then ''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:19&lt;br /&gt;
|Now, let us save and run this file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:25&lt;br /&gt;
| We can see that here '''stud1 '''and '''stud2 '''refers to two different '''objects'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:31&lt;br /&gt;
|That is, '''stud1 '''and '''stud2''' are referring to two different students.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:37&lt;br /&gt;
|They have different '''roll numbers''' and '''names'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   05:44&lt;br /&gt;
|  Now, we can make a change here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:51&lt;br /&gt;
|Here type '''Student stud2''' ''equal to'' '''stud1.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:01&lt;br /&gt;
|Now, '''save''' and '''run''' this''' file'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:06&lt;br /&gt;
|   We can see that here both''' stud1''' and '''stud2 '''refers to the same '''object.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:12&lt;br /&gt;
|That  means both '''stud1 '''and '''stud2 '''are referring to the same '''student''' with a roll number and name.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:31&lt;br /&gt;
|  So in this tutorial we learnt about&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:34&lt;br /&gt;
|Reference variables&lt;br /&gt;
|-&lt;br /&gt;
|06:35 &lt;br /&gt;
| Creating object using new operator &lt;br /&gt;
|-&lt;br /&gt;
| 06:38  &lt;br /&gt;
|And  Assigning references&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:41&lt;br /&gt;
|  For self assessment &lt;br /&gt;
|-&lt;br /&gt;
| 06:43&lt;br /&gt;
| create another '''class''' named '''TestEmployee'''.&lt;br /&gt;
|-&lt;br /&gt;
| 06:46&lt;br /&gt;
| Create an '''object '''of the '''Employee class'''  with ''reference variable'' as '''emp1'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:52&lt;br /&gt;
| To know more about the spoken tutorial project.&lt;br /&gt;
|-&lt;br /&gt;
| 06:55&lt;br /&gt;
|Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:58&lt;br /&gt;
| It summarises the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:01&lt;br /&gt;
| If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:05&lt;br /&gt;
| | The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:07&lt;br /&gt;
|Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:10&lt;br /&gt;
| Gives certificates for those who pass an online test &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:14&lt;br /&gt;
| For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:20&lt;br /&gt;
|  Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:24&lt;br /&gt;
|It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
|-&lt;br /&gt;
| 07:31&lt;br /&gt;
| More information on this Mission is available at &lt;br /&gt;
  [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:40&lt;br /&gt;
| Thus we  have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:43&lt;br /&gt;
|This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:46&lt;br /&gt;
|Thanks for joining us.&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Non-static-block/English-timed</id>
		<title>Java/C2/Non-static-block/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Non-static-block/English-timed"/>
				<updated>2014-01-02T07:57:24Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; {| border=1&lt;br /&gt;
|| ''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|  00:02&lt;br /&gt;
|  Welcome to the Spoken Tutorial on '''Non-static block '''in '''java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:06&lt;br /&gt;
|  In this tutorial we will learn &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:08&lt;br /&gt;
| About '''non-static''' '''block'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:10&lt;br /&gt;
|  When   a '''non-static block '''executed?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:13&lt;br /&gt;
|  Simple example of '''non-static block'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:16&lt;br /&gt;
|And Why we need '''constructors'''?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:18&lt;br /&gt;
|  Here we are using &lt;br /&gt;
&lt;br /&gt;
* Ubuntu version 11.10 &lt;br /&gt;
* Java Development Environment jdk 1.6&lt;br /&gt;
*And  Eclipse IDE 3.7.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:26&lt;br /&gt;
|To follow this tutorial you must know &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:29&lt;br /&gt;
|How to   create a '''constructor''' in '''Java''' using '''Eclipse'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:33&lt;br /&gt;
| If not, for relevant tutorials please visit our website which is as shown,&lt;br /&gt;
&lt;br /&gt;
('''http'''://'''www.spoken'''-'''tutorial.org''') &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:38&lt;br /&gt;
| Now we will see what a '''non-static block''' is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:42&lt;br /&gt;
| Any code written between two curly brackets is a '''non-static block'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:46  &lt;br /&gt;
| We can see the syntax here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:51&lt;br /&gt;
| When is a  '''non-static block'''  executed ?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:54&lt;br /&gt;
|A  '''non-static block''' is executedfor each object that is created. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:58&lt;br /&gt;
| It executes before the '''constructor''''s execution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:04&lt;br /&gt;
| It can initialize''' instance member variables '''of the class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:08&lt;br /&gt;
| Any other execution like calculation could also be given in the block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:14&lt;br /&gt;
| Now, let us switch to '''Eclipse''' and try to use a '''non-static block.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   01:22&lt;br /&gt;
|  I have already opened a class named '''NonStaticTest''' in '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:28&lt;br /&gt;
| I also have a created a '''class '''named '''A''' .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:33&lt;br /&gt;
| Now inside '''class''' '''A ''', I will first create a variable of type '''int'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:38&lt;br /&gt;
| So type '''int''' a semicolon, then press ''Enter''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:46&lt;br /&gt;
| Within curly brackets type '''System''' ''dot '''''out''' ''dot'' '''println''' within brackets and double quotes '''Non static''' '''block of an instance of Class A '''''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:12&lt;br /&gt;
| Then type '''System '''''dot'' '''out''' ''dot '''''println''' within brackets and double quotes '''The value of a''' is ''plus '''''a '''''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:32&lt;br /&gt;
| Now we will declare a '''constructor'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:35&lt;br /&gt;
| So type '''public A''' ''opening and closing brackets'', open the ''curly brackets''  press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:51&lt;br /&gt;
| Then type  '''System''' ''dot '''''out '''''dot'' '''println''' within brackets and double quotes '''Constructing object of type A''' semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:10&lt;br /&gt;
| Then type '''System''' ''dot'' '''out '''''dot '''''println''' within brackets and double quotes '''The value of a '''is ''plus'' '''a '''''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:35&lt;br /&gt;
| Now save this file.&lt;br /&gt;
|-&lt;br /&gt;
|  03:44&lt;br /&gt;
| Inside   '''class NonStaticTest''' in''' Eclipse '''let us create an '''object '''of the '''class A'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:53&lt;br /&gt;
| So type '''A''' ''space '''''a1''' ''equal to''''' new''' ''space'' '''A''' opening and closing brackets semicolon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:08&lt;br /&gt;
| Next line we will create one more object of class '''A'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:12&lt;br /&gt;
|So type '''A''''' space'' '''a2''' ''equal to'' '''new '''''space'' '''A''' opening and closing brackets semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:25&lt;br /&gt;
|Now  Save and run the file. So press '''Ctrl &amp;amp;S''' and '''Ctrl &amp;amp;F11 '''keys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:32&lt;br /&gt;
| We get the output as follows:&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:35&lt;br /&gt;
| As we can see when the first''' object '''is created, the '''non-static block''' is executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:45&lt;br /&gt;
|  '''non-static block'''   of an''' instance  of class A  '''  and the''' instance variable A '''is initialized to '''0'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:53&lt;br /&gt;
| Only after that the '''constructor''' is executed. Constructing object of type A &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:02&lt;br /&gt;
| And here the''' instance variable''' is again initialized to '''0'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:07&lt;br /&gt;
| Then again when the second '''object''' is created, the '''non-static block''' is executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:16&lt;br /&gt;
| This process is repeated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:20&lt;br /&gt;
|   We can have multiple '''non-static blocks''' in a '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:25&lt;br /&gt;
| In this case they execute in the sequence in which they appear in the '''class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:30&lt;br /&gt;
| We can try that now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:34&lt;br /&gt;
| Include one more block after the first one in class A.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:43&lt;br /&gt;
| So again type inside curly brackets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:47&lt;br /&gt;
|   '''System''' ''dot '''''out''' ''dot'' '''println''' within brackets and double quotes '''Second''' '''Non static''' '''block of an instance of Class A '''''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:08&lt;br /&gt;
| Then type '''System '''''dot'' '''out''' ''dot '''''println''' within brackets and double quotes '''The value of a''' is ''plus '''''a '''''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:30&lt;br /&gt;
| Now save this file ,press''' Ctrl &amp;amp; S key ''' simultaneously then press ''' Ctrl &amp;amp; F11 '''  to   run the program.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:44&lt;br /&gt;
|  We get the output as follows.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:48&lt;br /&gt;
|   we   see that after the first block is executed, the second is executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:58&lt;br /&gt;
|  Only then the '''constructor''' is executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:07&lt;br /&gt;
| Now  you might feel why do we need '''constructors.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:10&lt;br /&gt;
| The answer is we don't need the '''default constructor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  07:15&lt;br /&gt;
| But the '''non-static block''' cannot be '''parameterized'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:18&lt;br /&gt;
| You cannot have''' objects''' taking values from out side.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:22&lt;br /&gt;
| So '''non-static block '''is not a substitute for '''constructor.''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:27&lt;br /&gt;
| So let us summarizes&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:29&lt;br /&gt;
|  In this tutorial we learnt :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:32&lt;br /&gt;
| About '''non-static block'''   and how to use this block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:35&lt;br /&gt;
|  For self assessment,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:36&lt;br /&gt;
|  create a '''class '''named '''B.'''&lt;br /&gt;
|-&lt;br /&gt;
| 07:39&lt;br /&gt;
|   Create a '''non-static block''' and a '''constructor''' as shown in the tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:44&lt;br /&gt;
|  Create an '''object''' of '''class B''' in the '''class NonStaticTest '''already created'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:49&lt;br /&gt;
|   Check the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:51&lt;br /&gt;
|  To know more about the Spoken Tutorial Project&lt;br /&gt;
|-&lt;br /&gt;
| 07:53&lt;br /&gt;
|  Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
|-&lt;br /&gt;
| 07:56&lt;br /&gt;
|   It summarizes the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:00&lt;br /&gt;
|   If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:03&lt;br /&gt;
| The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:06&lt;br /&gt;
|   Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:08&lt;br /&gt;
|  Gives certificates for those who pass an online test &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:12&lt;br /&gt;
|  For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   08:18&lt;br /&gt;
 &lt;br /&gt;
|   Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:22&lt;br /&gt;
|   It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:28&lt;br /&gt;
|   More information on this Mission is available at &lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:37&lt;br /&gt;
|Thus we have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:40&lt;br /&gt;
|  This is Arya Ratish  from IIT BOmbay signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Using-this-keyword/English-timed</id>
		<title>Java/C2/Using-this-keyword/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Using-this-keyword/English-timed"/>
				<updated>2014-01-02T07:56:01Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|| ''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:02&lt;br /&gt;
|  Welcome to the Spoken Tutorial on '''using this keyword''' in '''java'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:07 &lt;br /&gt;
|  In this tutorial we will learn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:09&lt;br /&gt;
|About use of '''this''' keyword &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:11&lt;br /&gt;
|  To use '''this''' keyword with '''fields'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:14&lt;br /&gt;
| To use '''this '''keyword for chaining of '''constructors'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:17&lt;br /&gt;
|   Here we are using &lt;br /&gt;
&lt;br /&gt;
* Ubuntu version 11.10 &lt;br /&gt;
*  jdk 1.6&lt;br /&gt;
* Eclipse 3.7.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:28	&lt;br /&gt;
|  To follow this tutorial you must know &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:30&lt;br /&gt;
|  how to create a '''  constructor''' in '''java''' using '''eclipse'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:34&lt;br /&gt;
|  If not, for relevant tutorials please visit our website which is as shown,&lt;br /&gt;
&lt;br /&gt;
('''http'''://'''www.spoken'''-'''tutorial.org''') &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:40&lt;br /&gt;
|Now  we will see the use of this '''key word'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:44&lt;br /&gt;
| Within a '''constructor''', '''this''' is a reference to the current '''object'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:48&lt;br /&gt;
|  We can refer any member of the current '''object''' within a''' constructor''' using '''this'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:55&lt;br /&gt;
|Now we will see the use of '''this''' keyword with '''fields'''.	 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:00&lt;br /&gt;
| '''this '''keyword helps us to avoid name conflicts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:07&lt;br /&gt;
|  We can see such an example here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:10&lt;br /&gt;
|  For that let us open '''Eclipse'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:17&lt;br /&gt;
|  Open the '''Student class''' we had created in the earlier tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:23&lt;br /&gt;
|  Comment the '''default constructor ''' comment the '''constructor''' with 1 parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:40&lt;br /&gt;
|  Also comment the code for creating the first two '''objects'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:03&lt;br /&gt;
|  Now, notice the '''parameterized constructor.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:11&lt;br /&gt;
|  '''the_roll_number''' and '''the_name '''are the  arguments passed to the constructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:20&lt;br /&gt;
|  '''roll_number''' and '''name '''are the instance variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:26&lt;br /&gt;
|  Now, let me change the arguments to '''roll_number''' and '''name''' itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:39&lt;br /&gt;
|  So inside the '''constructor''' we have:&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:42&lt;br /&gt;
|  '''roll_number '''equal to''' roll_number''' and '''name '''equal to''' name.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:55&lt;br /&gt;
|Now  '''Save '''and '''run '''the file.So press'''Ctrl ,S'''and '''Ctrl, F11'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:04&lt;br /&gt;
|  We get the  output as follows:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:07&lt;br /&gt;
|   I am a  Parameterized Constructor&lt;br /&gt;
''' 0&lt;br /&gt;
 null'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:12&lt;br /&gt;
| Now come back to the  code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:17 &lt;br /&gt;
|  We  see 2 warnings in the code.&lt;br /&gt;
|-&lt;br /&gt;
| 03:20&lt;br /&gt;
|  Hover  your mouse over the warning symbol.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:23&lt;br /&gt;
|We can see  '''The assignment to the variable roll_number has no effect.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:29&lt;br /&gt;
| And '''The assignment to the  variable name has no effect.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:33&lt;br /&gt;
|  This is because in the '''constructor roll_number and name''' are '''local variables'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:40&lt;br /&gt;
|  '''Local variables''' are '''variables''' that are accessible within the '''method''' or '''block'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:47&lt;br /&gt;
|  Here, '''roll_number''' and '''name''' will be initialized to '''11''' and '''Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:54&lt;br /&gt;
| Because we have passed the values '''11''' and '''Raju'''the constructor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:01	&lt;br /&gt;
| But  once they come out of the '''constructor''', it is not accessible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:06&lt;br /&gt;
|  Then the only '''roll_number''' and '''name''' we know are the '''instance variables'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:13&lt;br /&gt;
|  They have been initialized to '''0 '''and '''null '''already once the '''object''' is created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:18&lt;br /&gt;
|  So we got the output as '''0 '''and '''null'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:21&lt;br /&gt;
|  Now, let us make a small change inside the constructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:29&lt;br /&gt;
| So type '''this '''''dot '''''roll_number equal to roll_number'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:37&lt;br /&gt;
|  And''' this '''''dot '''''name equal to name'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:44&lt;br /&gt;
|  Now '''save '''and '''run''' the file. So press '''ctrl, S''' And '''Ctrl, F11''' keys&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:51&lt;br /&gt;
| We get the output as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:53&lt;br /&gt;
|   I am Parameterized Constructor&lt;br /&gt;
 '''11 and&lt;br /&gt;
 Raju'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:58&lt;br /&gt;
|  This is because '''this '''''dot '''''roll_number '''and '''this '''''dot '''''name''' refers to the '''instance variables''' '''roll_number''' and '''name.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:12&lt;br /&gt;
|And here  '''roll_number '''and '''name '''are the arguments passed in the method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:19&lt;br /&gt;
|  To avoid confliction between '''local''' and '''instance''' variables we use '''this '''keyword.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:29&lt;br /&gt;
|  Now we will see the use of '''this keywords''' for chaining of constructor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:34&lt;br /&gt;
|  We can use '''this '''keyword inside a '''constructor''' to call another one. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:39&lt;br /&gt;
|  The '''constructors''' must be in the same '''class.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:43&lt;br /&gt;
|  This is called '''explicit constructor invocation'''.&lt;br /&gt;
|-&lt;br /&gt;
| 05:46&lt;br /&gt;
&lt;br /&gt;
| So let us come back to the''' Student '''class which we created.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:53&lt;br /&gt;
|Now  Remove the comments.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:28&lt;br /&gt;
| Now  comment the part to assign the '''instance variables to their values in the first two constructors.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:52&lt;br /&gt;
|Then  Comment the part which creates the''' '''second and third '''objects.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:08&lt;br /&gt;
| Now  let us first come to the   constructor with no parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:16&lt;br /&gt;
|  After   curly brackets type '''this''' within brackets '''11''' and  ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|  07:28&lt;br /&gt;
| Inside the second '''constructor''' type '''this''' within brackets '''11''' ''comma'' within double quotes '''Raju''' ''semicolon''.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:42&lt;br /&gt;
| Now '''Save''' and '''Run''' the file. So press '''Ctrl,S''' and '''Ctrl , F11'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:49&lt;br /&gt;
|  We get the output as &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:51&lt;br /&gt;
|   '''I am a Parameterized Constructor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:54&lt;br /&gt;
|   '''I am a constructor with a single parameter'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:57&lt;br /&gt;
|   '''I am Default Constructor'''&lt;br /&gt;
&lt;br /&gt;
'''11''' and&lt;br /&gt;
&lt;br /&gt;
'''Raju'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:02&lt;br /&gt;
| Now, I will explain the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:08&lt;br /&gt;
|  When the object is created, the respective constructor gets called.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:13&lt;br /&gt;
|  The '''constructor''' here is the '''no argument constructor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:20&lt;br /&gt;
|  The control comes to the first line in the '''constructor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:24&lt;br /&gt;
|  It encounters the '''this '''''within brackets '''''11''' statement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:26&lt;br /&gt;
|  Hence it calls the constructor that accepts single integer argument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:36&lt;br /&gt;
|  Then the control comes to '''this '''''within brackets''''' 11 '''''comma '''''Raju.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:44&lt;br /&gt;
|  Hence it calls the constructor that accepts 1 '''integer''' and 1 '''String''' argument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:53&lt;br /&gt;
|  So this '''constructor''' is executed and we get the output as '''I am Parameterized Constructor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:02&lt;br /&gt;
|Now  the instance variables will be initialized to  '''11''' and '''Raju.'''As we have passed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:11&lt;br /&gt;
|  Now, the control goes back to the calling '''constructor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:16&lt;br /&gt;
|  So the second''' constructor ''' gets executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:19&lt;br /&gt;
|  We get the output as''' I am constructor with a single parameter.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:25 &lt;br /&gt;
|  Then, the control goes to the first constructor and executes it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:30&lt;br /&gt;
|  So we get output as''' I am  a default constructor.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:36&lt;br /&gt;
|  Then '''studentDetail method''' is executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:42&lt;br /&gt;
|  So, we get '''11 '''and '''Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  09:45&lt;br /&gt;
|  Now, let us make a small change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:47&lt;br /&gt;
|  Make the '''this''' statement the last one in the constructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:00&lt;br /&gt;
|  We get  a compiler error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:03&lt;br /&gt;
|  Hover the mouse over the error symbol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:06&lt;br /&gt;
|  We get the error as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:07&lt;br /&gt;
|  '''Constructor''' call must be the first statement in the '''constructor'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:12&lt;br /&gt;
|   So we must make it the first line of the '''constructor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:16&lt;br /&gt;
| So make it the first line of the '''constructor.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:27&lt;br /&gt;
|  Now we can see that the error has gone.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:31&lt;br /&gt;
|  So in this tutorial, we   learnt &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:35&lt;br /&gt;
|  To use''' this''' keyword with''' fields.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:38&lt;br /&gt;
|  To use''' this''' keyword for chaining '''constructors'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:41&lt;br /&gt;
|  How '''this '''keyword should be used within a''' constructor.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:45&lt;br /&gt;
|  For self assessment, in the '''Employee class''' created earlier:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:49&lt;br /&gt;
|  Create a '''constructor''' with two parameters&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:52&lt;br /&gt;
|   Use''' this '''keyword to initialize the''' instance variables .'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:57&lt;br /&gt;
|  Also create a '''constructor''' with 1 and no parameters.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:01&lt;br /&gt;
|   Try chaining the '''constructors '''using '''this''' as explained in the tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  11:07&lt;br /&gt;
|  To know more about the Spoken Tutorial Project&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:09&lt;br /&gt;
|   Watch the video available at  the following link:[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:12&lt;br /&gt;
|   It summarizes the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:16&lt;br /&gt;
|   If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   11:19 &lt;br /&gt;
|  The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:23&lt;br /&gt;
|  Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:26&lt;br /&gt;
| Gives certificates for those who pass an online test &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:30&lt;br /&gt;
|  For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  11:36&lt;br /&gt;
|   Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:40&lt;br /&gt;
|   It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:46&lt;br /&gt;
|  More information on this Mission is available at &lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:55&lt;br /&gt;
| Thus We have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:58&lt;br /&gt;
|  This is Arya Ratish signing off. Thanks for joining.&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Instance-fields/English-timed</id>
		<title>Java/C2/Instance-fields/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Instance-fields/English-timed"/>
				<updated>2014-01-02T07:51:35Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; {| border=1&lt;br /&gt;
|| ''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:02&lt;br /&gt;
|  Welcome to the Spoken Tutorial on '''Instance Fields''' in '''Java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:06&lt;br /&gt;
| In this tutorial we will learn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:08&lt;br /&gt;
|   About '''instance fields'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:10&lt;br /&gt;
|   To access the '''instance fields '''of a '''class'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:13&lt;br /&gt;
|  '''Modifiers''' for '''instance fields'''&lt;br /&gt;
|-&lt;br /&gt;
| 00:15&lt;br /&gt;
| And Why '''instance fields''' are called so?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:18&lt;br /&gt;
|  Here we are using &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:20&lt;br /&gt;
|   Ubuntu version 11.10 &lt;br /&gt;
|-&lt;br /&gt;
| 00:22&lt;br /&gt;
|     jdk 1.6&lt;br /&gt;
|-&lt;br /&gt;
| 00:24&lt;br /&gt;
|  And  Eclipse IDE 3.7.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   00:27&lt;br /&gt;
|  To follow this tutorial you must know &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:30&lt;br /&gt;
|  how to create a '''class '''in '''Java '''using '''Eclipse'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:33&lt;br /&gt;
|  You must also know how to create an '''object '''for the '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:38&lt;br /&gt;
|  If not, for relevant tutorials please visit our website which is as shown,&lt;br /&gt;
&lt;br /&gt;
('''http'''://'''www.spoken'''-'''tutorial.org''') &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:43&lt;br /&gt;
|  We know that objects store their individual states in''' fields'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:48&lt;br /&gt;
|  These fields are declared without the  '''static'''  keyword.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:51&lt;br /&gt;
|  We will learn about''' static fields''' in the coming tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:55&lt;br /&gt;
|  '''Non-static fields''' are also known as '''''instance variables '''''or''''' instance fields.'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:01&lt;br /&gt;
|   Let us go back to the '''Student class''' we had already created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:09&lt;br /&gt;
|  We can see that here''' roll_no''' and '''name''' are the '''instance fields''' of this '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:15&lt;br /&gt;
|  Now, we will learn how to access these '''fields'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:18&lt;br /&gt;
|  For that, let us open the '''TestStudent class '''which we had already created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:27&lt;br /&gt;
|  We can remove the statement for creating the second '''object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:33&lt;br /&gt;
|  We will also remove the '''println '''statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:41&lt;br /&gt;
|  Now we will access the fields '''roll_no''' and '''name'''  of the student class using'''stud1 '''and the''' dot operator'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:49&lt;br /&gt;
|  So for that  type '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes, '''The roll number is''', then ''plus '''''stud1''''' dot ''''' from the option provided select''''' roll_no''''' '' press '''Enter'''  then ''semicolon''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:15&lt;br /&gt;
|  Next line type '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes '''The name is''',   ''plus '''''stud1''''' dot select  '''''name'''''   press '''enter''' ''  then ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:39&lt;br /&gt;
| Now, '''save''' and '''run''' the file '''TestStudent.java'''. So press '''  Ctrl, S''' and '''Ctrl, F11'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:48&lt;br /&gt;
|   We get the output as &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:51&lt;br /&gt;
|  '''The roll number is 0.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:53&lt;br /&gt;
|  '''The name is null.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:00  &lt;br /&gt;
|   This is because, we have not initialized the '''variables''' to any value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:05&lt;br /&gt;
|  In '''Java''', the '''fields''' cannot have random values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:09&lt;br /&gt;
|  After the '''memory''' is allocated for the '''object''' the '''fields''' are initialized to '''null '''or '''zero'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:15&lt;br /&gt;
|  This work is done by the '''constructor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:18&lt;br /&gt;
|  We will learn about '''constructor''' in the coming tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:21&lt;br /&gt;
|  Now, we will initialize the '''fields''' explicitly and see the '''output'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:27&lt;br /&gt;
|So  type,'''int ''' ''' roll_no''' equal to '''50'''  next line string   '''name''' equal to within double quotes '''Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:42&lt;br /&gt;
| | Now, '''save '''and '''run '''the file. Press '''Ctrl,S''' and '''Ctrl F11 '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:50&lt;br /&gt;
|  We get the '''output''' as expected '''The roll number is 50'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:54&lt;br /&gt;
|  '''The name is Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:56 &lt;br /&gt;
|This is because we have explicitly initialize the variables  in the '''Student''' class&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:04&lt;br /&gt;
|  We can see that here the '''fields '''have no '''modifier '''or''' '''the''' default modifier'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:10&lt;br /&gt;
|  Recall '''modifiers''' we had discussed in '''Creating Classes.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:14&lt;br /&gt;
|  We can access the fields because both '''Student.java''' and '''TestStudent.java''' are in the same '''package'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:22&lt;br /&gt;
|  We can see that here they are in the same '''default package'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:30&lt;br /&gt;
|  We will learn about '''packages''' in the later tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:34&lt;br /&gt;
| We will now change the modifier to '''private'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:37 &lt;br /&gt;
|  So before the '''field''' declarations type '''private'''. So type '''private int ''' '''roll no=50'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:48&lt;br /&gt;
|  Next line '''private string''' '''name ='''Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:53&lt;br /&gt;
|  Now '''save''' the file '''Student.java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:00&lt;br /&gt;
| | We can see that we get errors in '''TestStudent.java'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:05&lt;br /&gt;
|  Hover the mouse over the error symbol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:08&lt;br /&gt;
|  It says '''The field Student '''''dot '''''roll ''''' '''''number '''is not visible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:12&lt;br /&gt;
| And '''The field Student '''''dot '''''name '''is not visible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:16&lt;br /&gt;
|  This is because private fields can be accessed only within its own class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:23&lt;br /&gt;
|  You can try accessing '''roll_no''' and '''name''' from the '''Student class '''itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:27&lt;br /&gt;
|  You will find that you can access them without any error.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:32&lt;br /&gt;
| Now let us change the '''modifier''' to '''protected'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:52&lt;br /&gt;
| Now  '''Save''' the file and '''Run''' the program&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:00&lt;br /&gt;
|  We see the '''output''' on the console. The '''Roll no is 50'''   the name is '''Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:07&lt;br /&gt;
|  This is because '''protected fields''' can be accessed within the same '''package'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:17&lt;br /&gt;
| Now let us see why ''' instance fields''' are called so? &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:22 &lt;br /&gt;
|  '''Instance fields''' are called so because their values are unique to each '''''instance''''' of a class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:29&lt;br /&gt;
|  In other words each object of a class will have unique values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:34&lt;br /&gt;
|  Let us go to the '''TestStudent class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:43&lt;br /&gt;
|  Here, we will create one more object of the '''Student class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:50&lt;br /&gt;
|  So type next line'''Student''' space '''stud2''' equal to '''new''' space '''Student''' , opening and closing brackets semicolon.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:06 	&lt;br /&gt;
|  We will now initialize both the objects in the'''TestStudent class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:18&lt;br /&gt;
|  Next line type '''stud1''' ''dot '' select'''roll_no'''  press ''' enter''' equal to '''20 '''  ''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:32&lt;br /&gt;
|  Next line type '''stud1''' ''dot'' select  '''name''' press '''enter''' equal to within double quotes '''Ramu '''''semicolon'' press '''enter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:54&lt;br /&gt;
|  Thus we have initialized the fields for the first object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:58&lt;br /&gt;
|  Now, we will initialize the fields for the second object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:02&lt;br /&gt;
|  So type '''stud2''' ''dot'' select'''roll_no''' equal to '''30 '''  ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:15 &lt;br /&gt;
| Next line   '''stud2''' ''dot'' select '''name''' equal to within double quotes''' Shyamu '''''semicolon'''''  press''' enter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:34&lt;br /&gt;
|  Now after the '''println''' statements, type '''System''' '''dot''' '''out''' dot '''println''' within brackets and double quotes '''The roll number is''',  ''plus '''''stud2 '''''dot  select '''''roll_no''''' ''and  ''semicolon''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:03&lt;br /&gt;
|  '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes '''The name is''',  ''plus '''''stud2 '''''dot select '''''name''''' ''and   ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:28&lt;br /&gt;
|  Now, '''save''' and''' run '''the file. Press ''' Ctrl,s''' and '''Ctrl, F11'''  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:38&lt;br /&gt;
|   We get the output as follows.  The roll_no is '''20'', The name is''' Ramu''' roll_no is '''30''',   name is''' shyamu'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:47&lt;br /&gt;
|  Here both '''stud1''' and '''stud2''' are referring to two different '''objects'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:52&lt;br /&gt;
|  This means that the two '''objects''' have unique values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:56&lt;br /&gt;
|  We can see that here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:57&lt;br /&gt;
|  The first object has the values '''20''' and '''Ramu'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:02&lt;br /&gt;
|  The second object has the values '''30 '''and '''Shyamu''' .&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:09&lt;br /&gt;
|   Now, let us create one more '''object.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:13&lt;br /&gt;
|  So type '''Student''' space '''stud3''' equal to '''new''' space '''Student'''  within brackets opening and closing brackets semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:36&lt;br /&gt;
|  We will now, print the values  of the third '''object''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:44&lt;br /&gt;
| So type  '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes '''The  roll_no is''',  ''plus '''''stud3 '''''dot select '''''roll_no'''''     ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:09&lt;br /&gt;
|next line type  '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes '''The  name is''',  ''plus '''''stud3 '''''dot   ''''' name'''''     ''semicolon''.&lt;br /&gt;
|-&lt;br /&gt;
| 11:29&lt;br /&gt;
|  Now,''' save''' and '''run''' the file. So press '''Ctrl, S''' and '''Ctrl, F11''' .&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:36 &lt;br /&gt;
| We  can see that the third '''object''' contains the values''' 50''' and '''Raju.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  11:46&lt;br /&gt;
|  This is because we had explicitly initialized the fields of the '''Student''' class to''' 50''' and ''' Raju'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:54&lt;br /&gt;
|  Now, try de-initializing the fields and see the output for the third object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  12:02&lt;br /&gt;
| So in this tutorial, we learnt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:05&lt;br /&gt;
|   About instance fields.&lt;br /&gt;
|-&lt;br /&gt;
| 12:07&lt;br /&gt;
|  Accessing the fields using dot operator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  12:11&lt;br /&gt;
| | For self assessment,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:13&lt;br /&gt;
|  Create an  object emp2 in the Test Employee class already created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:18&lt;br /&gt;
|  Then initialize the values of the two objects using dot operator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:23&lt;br /&gt;
|  Use 55 and Priya as values for first object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:27&lt;br /&gt;
|  Use 45 and Sandeep as values for second object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:31&lt;br /&gt;
|  Display the values for both the objects in the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  12:34&lt;br /&gt;
|  To know more about the Spoken Tutorial Project&lt;br /&gt;
|-&lt;br /&gt;
| 12:37&lt;br /&gt;
|   Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
|-&lt;br /&gt;
| 12:40&lt;br /&gt;
|   It summarizes the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:43&lt;br /&gt;
|   If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|    12:47&lt;br /&gt;
| The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|12:49 &lt;br /&gt;
|   Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  12:52&lt;br /&gt;
|  Gives certificates for those who pass an online test &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:56&lt;br /&gt;
|   For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  13:01&lt;br /&gt;
|   Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:05&lt;br /&gt;
|  It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:11&lt;br /&gt;
|   More information on this Mission is available at &lt;br /&gt;
  [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  13:09&lt;br /&gt;
|  Thus we have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:22 &lt;br /&gt;
|  This is Arya Ratish from IIT Bombay signing off.   Thanks for joining.&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/First-Java-Program/English-timed</id>
		<title>Java/C2/First-Java-Program/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/First-Java-Program/English-timed"/>
				<updated>2014-01-02T07:43:15Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &lt;br /&gt;
{| border=1&lt;br /&gt;
|| '''Time''''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:02&lt;br /&gt;
|  Welcome to the Spoken Tutorial on getting started with the '''First java program'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:09&lt;br /&gt;
|| In this tutorial we will learn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:11&lt;br /&gt;
| To create a simple java program.  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:14&lt;br /&gt;
| To compile the program. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:16&lt;br /&gt;
| To run the program.  and&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:19&lt;br /&gt;
| About the naming conventions followed in java&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:23&lt;br /&gt;
|  Here we are using   Ubuntu version 11.10 and   jdk 1.6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:32&lt;br /&gt;
|  To follow this tutorial '''JDK 1.6 '''must be installed on your system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:39&lt;br /&gt;
|If not, for relevant tutorial please visit our website which is as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:46&lt;br /&gt;
|Alright now let us   write our first java program.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:51&lt;br /&gt;
|For that you need a '''Terminal''' and you need  a '''Text''' '''Editor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:56&lt;br /&gt;
| I am using '''gedit''' as my '''Text Editor''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:01&lt;br /&gt;
|  In the '''text editor'''   , we will first create the class '''HelloWorld'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:06&lt;br /&gt;
|So type '''class HelloWorld'''. '''HelloWorld '''is the name of the class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:17&lt;br /&gt;
| And   Open ''curly bracket''.   '''Enter '''and close ''curly bracket''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:24&lt;br /&gt;
|  The code between  this two curly brackets  will belong to the class '''HelloWorld'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:33&lt;br /&gt;
|   Now save the file by clicking on '''Save '''icon at the top &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:37&lt;br /&gt;
|It is a good practice to save the file frequently. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:43&lt;br /&gt;
|   so '''Save As Dialog box ''' appears.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:46&lt;br /&gt;
|Browse the location where you want to save your file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:51&lt;br /&gt;
|  Here, in the home directory i will create a folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:57 &lt;br /&gt;
|Let us name it    '''Demo''' and press ''' enter'''&lt;br /&gt;
|-&lt;br /&gt;
|  02:02&lt;br /&gt;
|Then inside this folder we will save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:08&lt;br /&gt;
| In the '''Name''' text-box, type the name of the class.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:13&lt;br /&gt;
|In java, the name of the class and the file name should be same.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:20&lt;br /&gt;
|Recall that we   created   class   HelloWorld.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:25&lt;br /&gt;
|So we will save the file   as''' HelloWorld dot java'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:33&lt;br /&gt;
|  '''Dot '''java is the file extension  given to  the java file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:39&lt;br /&gt;
|  Then click on '''Save '''button. So the file is now saved.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   02:47&lt;br /&gt;
| Inside the class, we write the '''main''' method. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:53&lt;br /&gt;
|So type:&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:54&lt;br /&gt;
|'''''public static void main '''   ''parentheses'' inside   ''parentheses'' '''String''' '''arg''' Square brackets'' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:10&lt;br /&gt;
|'''Main''' functions marks the starting point of the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:15&lt;br /&gt;
|We will describe  '''public, static, void and String arg'''  in a future tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:23&lt;br /&gt;
|Then  once again, open curly bracket.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:27&lt;br /&gt;
|Press '''Enter '''and close curly bracket.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
|-&lt;br /&gt;
|  03:32&lt;br /&gt;
|  The code between these two curly brackets will belong to the main method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:41&lt;br /&gt;
|  We will now write a code to display a line on the '''Terminal'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:46&lt;br /&gt;
|So  inside main method  type'''''System '''dot''' out '''dot''' println''''' parentheses semi-colon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:59&lt;br /&gt;
|This is the statement  used to print a line.   &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:05&lt;br /&gt;
|semi-colon is used to terminate a line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:10&lt;br /&gt;
|Now let us tell Java,  what to print.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:13&lt;br /&gt;
| So Within '''''parentheses in double quotes type, My first java program exclamation mark'''.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:30&lt;br /&gt;
|  Let us '''Save '''the file by clicking on '''Save''' icon.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:36&lt;br /&gt;
|  Let's go   to  '''Terminal'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   04:38&lt;br /&gt;
|  Make sure that you are in the directory where  you save your  '''HelloWorld.java''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:46&lt;br /&gt;
|Remember that I am in my home directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 |-&lt;br /&gt;
|  04:50&lt;br /&gt;
|So''''' '''''type''''' cd '''Space''' Demo '''''and''''' '''hit''' Enter'''''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:56&lt;br /&gt;
| ls&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:59&lt;br /&gt;
|We see  ''' HelloWorld.java''' file present in the Demo folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:06&lt;br /&gt;
| Lets compile this file so type   '''javac '''Space''' HelloWorld '''dot''' java''''' and hit''' enter''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:21&lt;br /&gt;
|This   compile the file that we have created. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:25&lt;br /&gt;
|  Alright now the file is compiled as we see no error.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:30&lt;br /&gt;
|We can see '''HelloWorld.class''' file created.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:36&lt;br /&gt;
|This file can run anywhere.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:38&lt;br /&gt;
|That is, on any '''Operating System. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:41&lt;br /&gt;
|We do not need java compiler as well.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:45&lt;br /&gt;
|Hence, java is rightly described as “write once, run anywhere.”&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:51&lt;br /&gt;
| So  After successful compilation, run the program using the command, &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:56&lt;br /&gt;
|'''''java '''''(This time no c) space '''''HelloWorld '''''(and no dot java) extension and hit '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:07&lt;br /&gt;
| You  will get  the output '''My first java program!'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:13&lt;br /&gt;
|So we have written our first java program.Let us go back to '''editor'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|  06:22&lt;br /&gt;
|  Now, remove the '''''semi-colon '''''which is at the end of the statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:27&lt;br /&gt;
|    Click on     '''Save''' icon.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:29&lt;br /&gt;
|  Let us go back to the '''Terminal'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:33&lt;br /&gt;
|  Run the command '''''javac ''' ''' HelloWorld '''dot''' java'''''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:41&lt;br /&gt;
| The compiler gives an error.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:44&lt;br /&gt;
|It says, a semi colon is expected on the fifth line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:52&lt;br /&gt;
|The up arrow points to the error statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:57&lt;br /&gt;
|  Let us go back to the '''  Editor'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:01&lt;br /&gt;
|In Java, all statements are terminated with semicolons. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|     07:06&lt;br /&gt;
| So go to the fifth line and add a semicolon.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:13&lt;br /&gt;
|  Click on the '''Save '''icon. It is necessary to save the file before compiling&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:22&lt;br /&gt;
| Let us go back to the '''Terminal'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:25&lt;br /&gt;
|Compile the file using   '''''javac ''' ''' HelloWorld '''dot''' java'''''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:32&lt;br /&gt;
|   The file is successfully compiled as we see no errors.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:36&lt;br /&gt;
|Now, run the program using the command  '''''java'''''  '''''HelloWorld''''' and  .&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
| 07:45 &lt;br /&gt;
| We see the output '''My first java program!'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:49&lt;br /&gt;
|This is how you handle errors in java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:54&lt;br /&gt;
|As the series progresses, we will learn more about the errors.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:02&lt;br /&gt;
|  We now see what are the naming conventions in java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:06&lt;br /&gt;
|*   The class name should be in CamelCase.&lt;br /&gt;
|-&lt;br /&gt;
|  08:10&lt;br /&gt;
|* Which means each new word begins with an upper case.&lt;br /&gt;
|-&lt;br /&gt;
|  08:14&lt;br /&gt;
|* Example: class HelloWorld, class ChessGame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:19&lt;br /&gt;
|So,''' H''' of hello and  '''W''' of World are in uppercase.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:25&lt;br /&gt;
|Similarly C and G of Chess and Game respectively are in uppercase. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:31&lt;br /&gt;
|  The method name should be the mixed case.&lt;br /&gt;
|-&lt;br /&gt;
|  08:35&lt;br /&gt;
| Which means that the first word should begin with a lower case. &lt;br /&gt;
|-&lt;br /&gt;
|  08:39&lt;br /&gt;
|And all new words followed should begin with an upper case.&lt;br /&gt;
|-&lt;br /&gt;
|  08:44&lt;br /&gt;
|Also the method name should be a verb.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:48&lt;br /&gt;
|  For    Example: showString(), main(), goToHelp(). Here '''s''' of show is in lowercase while  '''S''' of string is in uppercase &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:02&lt;br /&gt;
|The variable name should not begin with '''digits''' . &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  09:06&lt;br /&gt;
| We cannot use keywords for our class, method or variable name.&lt;br /&gt;
|-&lt;br /&gt;
|  09:13&lt;br /&gt;
|For example:  cannot use keywords like''' public, private, void, static and many more'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  09:22&lt;br /&gt;
|   So in this tutorial, we have learnt to write, compile and run a simple java program.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  09:30&lt;br /&gt;
|We also saw the naming conventions followed in java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:35&lt;br /&gt;
| | For self assessment write a simple java program to print '''Java file name and class name should be same'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  09:47&lt;br /&gt;
|To know more about the Spoken Tutorial Project&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  09:50&lt;br /&gt;
|   Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
|-&lt;br /&gt;
|  09:58&lt;br /&gt;
| It summarises the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:02&lt;br /&gt;
| If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:08&lt;br /&gt;
|  The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:10&lt;br /&gt;
| Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:13&lt;br /&gt;
|Gives certificates to those who pass an online test &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:17&lt;br /&gt;
| For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:25&lt;br /&gt;
|  Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:30&lt;br /&gt;
|It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:38&lt;br /&gt;
| More information on this Mission is available at &lt;br /&gt;
&lt;br /&gt;
 [http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:49&lt;br /&gt;
| We have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:51&lt;br /&gt;
|Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:53 &lt;br /&gt;
|This is Prathamesh Salunke signing off.  Jai Hind. &lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Methods/English-timed</id>
		<title>Java/C2/Methods/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Methods/English-timed"/>
				<updated>2014-01-01T06:56:29Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|| ''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:02&lt;br /&gt;
| Welcome to the Spoken Tutorial on '''methods in  java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:06&lt;br /&gt;
|   In this tutorial we will learn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:08&lt;br /&gt;
|   To create a method.  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:10&lt;br /&gt;
| And To call a method. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:13&lt;br /&gt;
|  Here we are using &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:14&lt;br /&gt;
|   Ubuntu version 11.10 &lt;br /&gt;
|-&lt;br /&gt;
|00:17&lt;br /&gt;
|  Java Development  kit 1.6 and&lt;br /&gt;
|-&lt;br /&gt;
|00:20&lt;br /&gt;
|   Eclipse 3.7.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   00:24&lt;br /&gt;
|  To follow this tutorial you must know how to write, compile and run a simple java program in eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:32&lt;br /&gt;
|  If not, for relevant tutorials please visit our website which is as shown,&lt;br /&gt;
&lt;br /&gt;
(http://www.spoken-tutorial.org) &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:40&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|A java method is a collection of statements that performs a specified operation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:46&lt;br /&gt;
|Let us now write a method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:50&lt;br /&gt;
|  So, in the '''eclipse,''' I have already created a project Methods.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:57&lt;br /&gt;
|   In the project, I have created a java class name '''MethodDemo'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:06&lt;br /&gt;
| In the class outside the main method we will write a method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:13&lt;br /&gt;
|  So type '''''void''''' name of the method&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:19&lt;br /&gt;
|  Let us name it as '''''displayMessage''''' ''parentheses''  '''Enter'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:29&lt;br /&gt;
|  And ''curly'' ''brackets.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:32&lt;br /&gt;
| A method can  return a value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:34&lt;br /&gt;
|  But if you don’t want the method to return a value then the keyword '''void'''is used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:42&lt;br /&gt;
| Alright now inside the curly brackets, let us print a message.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:47&lt;br /&gt;
|  So type '''''System '''dot''' out '''dot''' println ''Hello''' '''Method'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:06&lt;br /&gt;
|  So we have written a method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:10&lt;br /&gt;
|Now  we will call this method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:13&lt;br /&gt;
|  So inside the  '''Main''' method,  we will  create an object of the class'''MethodDemo'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:21&lt;br /&gt;
|  So   '''MethodDemo''' object  name.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:26&lt;br /&gt;
|  Let's name it as '''md =new ''' '''MethodDemo''' ''parentheses'', ''semicolon.'' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:37&lt;br /&gt;
|  So we have created an object '''md'''of the class '''MethodDemo''' using the '''New''' operator.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:48&lt;br /&gt;
| Now let us call the method '''displayMessage.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:51&lt;br /&gt;
| So type '''''md''''' ''dot'' '''''displayMessage'''''  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:00&lt;br /&gt;
|  The '''Dot''' operator is used to call the method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:06&lt;br /&gt;
| Now  let us '''Run''' this application by clicking on '''Run'''icon.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:14&lt;br /&gt;
| We see the output '''Hello''' '''Method '''on''' '''the''' '''console&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:20&lt;br /&gt;
|Now  let us return an '''integer ''' instead of'''void'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:26&lt;br /&gt;
|  So  type '''''int.'''''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:32&lt;br /&gt;
|   Also make the method '''public''', that is accessible everywhere.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:37&lt;br /&gt;
|  By default it is '''private''', that is accessible only within the class where it is written.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:45   &lt;br /&gt;
|  Now inside the method type '''''return''''' ''seven'', ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:55&lt;br /&gt;
| Remember that we write  the '''return'''  statement  at the end of all in the method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:02&lt;br /&gt;
|  This is because after '''return''' statement no other statements are executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:08	&lt;br /&gt;
|   Now inside the '''Main''' method at the end type the ''' print statement'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:15&lt;br /&gt;
|  So type '''System''' ''dot'' '''out''' ''dot'' '''println();'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:23&lt;br /&gt;
|  Within ''parenthesis'' we will call the method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:28&lt;br /&gt;
|  So put '''''md''''' ''dot'' method inside the ''parentheses''  remove the ''semi''-''colon''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:37&lt;br /&gt;
|  This will print the return value of the method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:42&lt;br /&gt;
|  '''Run''' the application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:45 &lt;br /&gt;
| We see in the output, the value '''7''' is printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:51&lt;br /&gt;
| Now we will write another method and call this methd in '''displayMessage.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:59&lt;br /&gt;
|  So type '''''public void '''''method name '''''square '''''within ''parentheses'' '''''int a'''''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:15&lt;br /&gt;
| | Here we are giving '''int a''' as a parameter to our method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:20&lt;br /&gt;
| Now within ''curly'' brackets type, '''''System '''dot '''out '''dot''' println''''' within parentheses '''''a''''' ''into'' '''''a'''''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:37&lt;br /&gt;
|  So we have written a '''square''' method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:40&lt;br /&gt;
|  That will display a square of an integer which is  given as a parameter.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:48&lt;br /&gt;
| Let us call this method in the '''displayMessage''' method. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:53&lt;br /&gt;
|  So type '''''square''''' within ''parentheses'' an integer '''''5''''', ''semicolon.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:07&lt;br /&gt;
|  | '''Run''' this application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:12&lt;br /&gt;
|  We see that the output displays the square of '''5''' that is '''25.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:19  &lt;br /&gt;
| Now let us understand the flow of the application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:24&lt;br /&gt;
|  The starting point is the '''Main''' method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:29&lt;br /&gt;
|  In the '''Main '''method''', '''we have first called the '''displayMessage'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:34&lt;br /&gt;
|  So the control goes to the '''displayMessage.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:40&lt;br /&gt;
|  And all the statements in the '''displayMessage''' are executed. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:45&lt;br /&gt;
|  The first one is the '''print''' statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:50&lt;br /&gt;
|   Then it comes across the '''square''' method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:54&lt;br /&gt;
|  So the control jumps to the '''square''' method. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:57&lt;br /&gt;
|  The square method takes an '''integer 5''' and returns the square of the integer i.e. '''25'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:06&lt;br /&gt;
|  Then the control goes back to the '''displayMessage'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:10&lt;br /&gt;
|And it returns the value '''7'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:14&lt;br /&gt;
| Then the control jumps back to the '''Main'''  function.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:20&lt;br /&gt;
|  Since there are no statements left to execute, in the '''main''' method the application terminates&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:29&lt;br /&gt;
| Alright now let us  make '''displayMessage''' as '''static'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:35&lt;br /&gt;
|  So after '''''public''''' type '''''static''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:40&lt;br /&gt;
|    We see that we cannot call a non static method inside the '''static'''  method&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:47&lt;br /&gt;
| So we will comment this call.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:52&lt;br /&gt;
| Since '''Main''' is a static method, we can call the '''static  displayMessage '''inside this&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:02&lt;br /&gt;
|  Now for static method we do not need to create  an  object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:07&lt;br /&gt;
|  So we will comment this object creation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:11&lt;br /&gt;
|  Also  we will '''Delete''' '''md.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:18  &lt;br /&gt;
|  '''Run''' the application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:22&lt;br /&gt;
|  We see the output '''Hello Method '''and '''7'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:27&lt;br /&gt;
|  We do not see  25 because we have commented the call to square method&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:34 &lt;br /&gt;
| We can also call method from other class.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:38&lt;br /&gt;
| For that I have created a class '''Demo.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:45&lt;br /&gt;
|   Inside the class create a method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:48&lt;br /&gt;
|  So type '''''public void show''' parentheses'' '''Enter'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:56&lt;br /&gt;
|  Inside ''curly brackets'', ''''' System '''dot''' out '''dot''' println'''''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:07&lt;br /&gt;
|  '''''I am from other class.'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:13&lt;br /&gt;
| '''Save''' the file. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:16&lt;br /&gt;
| Go back to  method '''MethodDemo''' class&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:19&lt;br /&gt;
| Now we will call this '''show''' method inside the method '''MethodDemo''' class.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:28&lt;br /&gt;
|  For that we need to create the object of the class '''Demo.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:22&lt;br /&gt;
|  This is because the  '''show'''  method belongs to the class '''Demo.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:38&lt;br /&gt;
|  So type '''Demo d=new Demo''' ''parentheses,'' ''semicolon''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:48&lt;br /&gt;
|  Then call the method '''show''' parentheses.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  09:54&lt;br /&gt;
|  Lets '''Run''' this application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:58&lt;br /&gt;
|  We see on the console '''I am from other class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:04&lt;br /&gt;
|  This is how methods are used in java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:09  &lt;br /&gt;
|  The method name and the parameters forms the signature of the method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:14&lt;br /&gt;
|  While  the curly brackets  and the statements  forms the body of the method. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:23 &lt;br /&gt;
|  So in this tutorial, we have learnt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:25&lt;br /&gt;
|   To create a method&lt;br /&gt;
|-&lt;br /&gt;
|10:27&lt;br /&gt;
|  To call a method&lt;br /&gt;
|-&lt;br /&gt;
|10:29&lt;br /&gt;
| And Different signatures of methods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:32&lt;br /&gt;
|  | For self assessment, create a method which prints the cube of an integer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:38&lt;br /&gt;
| To know more about the Spoken Tutorial Project&lt;br /&gt;
|-&lt;br /&gt;
|10:41&lt;br /&gt;
|  Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
|-&lt;br /&gt;
|10:47&lt;br /&gt;
|  It  summarizes the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:50&lt;br /&gt;
|   If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:54&lt;br /&gt;
|  The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:56&lt;br /&gt;
|   Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:58&lt;br /&gt;
|   Gives certificates to those who have pass an online test &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|11:02&lt;br /&gt;
|  For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:08 &lt;br /&gt;
|  Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|11:12&lt;br /&gt;
|   It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|11:18&lt;br /&gt;
|  More information on this Mission is available at &lt;br /&gt;
 [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:27&lt;br /&gt;
| We have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|11:29&lt;br /&gt;
|  Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|11:30&lt;br /&gt;
|  This is Prathamesh Salunke signing off. &lt;br /&gt;
&lt;br /&gt;
Jai Hind. &lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Nested-if/English-timed</id>
		<title>Java/C2/Nested-if/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Nested-if/English-timed"/>
				<updated>2014-01-01T06:54:45Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &lt;br /&gt;
{| border=1&lt;br /&gt;
| '''Time'''&lt;br /&gt;
|'''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|  00:02&lt;br /&gt;
| Welcome to the spoken tutorial on '''Nested-If and Ternary Operator '''in java'''.''' &lt;br /&gt;
|-&lt;br /&gt;
|  00:07&lt;br /&gt;
| By the end of this tutorial you should be able to:&lt;br /&gt;
&lt;br /&gt;
* Explain Nested-If Statements and Ternary operators.&lt;br /&gt;
* Use them in a Java program.&lt;br /&gt;
|-&lt;br /&gt;
| 00:17&lt;br /&gt;
|  | For this tutorial we are using:&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu v 11.10,'''&lt;br /&gt;
&lt;br /&gt;
'''JDK 1.6,'''and&lt;br /&gt;
&lt;br /&gt;
'''EclipseIDE 3.7.0'''&lt;br /&gt;
|-&lt;br /&gt;
|  00:27&lt;br /&gt;
| To follow this tutorial, you should know,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:29&lt;br /&gt;
|about the usage of '''relational and logical operators'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:33&lt;br /&gt;
|And '''if...else''' control flow statements.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:36&lt;br /&gt;
|If not, for relevant tutorial please visit our website which is as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:41&lt;br /&gt;
|  Nested '''if''' statements, An '''If''' statement within another '''if '''statement is called a '''nested-if '''statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:49&lt;br /&gt;
||Now let us look at the syntax for writing the '''Nested-If statement'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:53&lt;br /&gt;
|In this case, if condition 1 is true, then the program checks for condition 2.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:59&lt;br /&gt;
|Condition 2 is given using another If statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:03&lt;br /&gt;
| If condition 2 is true, then the program executes Statement or block 1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:09&lt;br /&gt;
|Else, it executes Statement or block 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:13&lt;br /&gt;
|If condition 1 is false, then the program will not check condition2.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:18&lt;br /&gt;
|Instead it will directly jump to its else statement i.e. block 3.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:24&lt;br /&gt;
|   now Let us try an example to understand that better&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|    01:28&lt;br /&gt;
|  We have the eclipse IDE and the skeleton required for the rest of the code. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:32&lt;br /&gt;
|We have created a class '''NesedIfDemo''' and added the main method to it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:37&lt;br /&gt;
| We shall check if the given number is a even number or an odd number.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:42&lt;br /&gt;
|  we will also handle negative numbers using a nested-if.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:46  &lt;br /&gt;
|So inside the main method  type &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:49&lt;br /&gt;
|'''int n = minus 5;'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|   01:54&lt;br /&gt;
|We have created a variable n  to store the negative number.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:58&lt;br /&gt;
|Now we shall write the if conditions.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:01&lt;br /&gt;
|  Next line Type&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:02&lt;br /&gt;
|'''if (n  &amp;lt; 0)  '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:07&lt;br /&gt;
|'''''open curly bracket'''''. Press enter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:10&lt;br /&gt;
|'''System.out.println Within brackets and double quotes (“Negative number”);'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:22&lt;br /&gt;
|We first see if the number is a negative number.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:25 &lt;br /&gt;
|If yes then we will not check for even and odd.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:29&lt;br /&gt;
|  if the number is not a negative, we  check for even and odd.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:34&lt;br /&gt;
|   Next line Type&lt;br /&gt;
&lt;br /&gt;
'''else {'''&lt;br /&gt;
&lt;br /&gt;
'''}''' Press enter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:42&lt;br /&gt;
|Now if the execution has come to the else part.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:45&lt;br /&gt;
|It means that the number is non negative.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:48&lt;br /&gt;
|So we check for odd or even inside this else part.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   02:52&lt;br /&gt;
|  Type&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:53&lt;br /&gt;
|'''if (n ''modules'' 2  double equal to 0) {''' Press enter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:03&lt;br /&gt;
|'''System.out.println(“Even number”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''else {''' press enter&lt;br /&gt;
&lt;br /&gt;
Type &lt;br /&gt;
&lt;br /&gt;
'''System.out.println(“Odd number”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|-&lt;br /&gt;
|  03:29&lt;br /&gt;
|So we make sure that negative numbers are not considered for odd or even check.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:34&lt;br /&gt;
|Now let us see the code in action.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:37&lt;br /&gt;
|  Save and run the file.As we can see, we get the output  as“negative number”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:43&lt;br /&gt;
|now Let us try a positive number&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:46&lt;br /&gt;
|   Change n = -5 to n = 5&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:53&lt;br /&gt;
|Now'''Save''' and''' Run''' the file&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:57&lt;br /&gt;
| As we can see, the output is odd number as expected. Let us try an even number&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:04&lt;br /&gt;
|  Change n = 5 to n = 10.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:09&lt;br /&gt;
|Now Save and run the file&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:12&lt;br /&gt;
|  As we can see, the output is “even” number as expected.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:17&lt;br /&gt;
|  This process of including an if statement inside another, is called nested-if.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:22 &lt;br /&gt;
|There is no limit to the amount of nesting.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:25&lt;br /&gt;
|But it is a good practice to not go beyond 3 levels of nesting.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:31&lt;br /&gt;
| | Now we shall look at the ternary operator.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:33&lt;br /&gt;
|First let me clean up the '''Main''' method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:37&lt;br /&gt;
|   We shall write a program that divides a number by 2. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:40&lt;br /&gt;
|It is a very trivial program but the issue comes in dividing odd numbers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:45&lt;br /&gt;
|When 7 is divided by 2, we get 3.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   04:48&lt;br /&gt;
|But what if we want the result to be rounded off.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:50&lt;br /&gt;
|Which means, when 7 is divided by 2, we get   4 and not 3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:56 &lt;br /&gt;
|In simple terms, we need the next number.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:59&lt;br /&gt;
|  Let us see how to write such a program.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:01&lt;br /&gt;
| See inside the  main method Type  '''int n, nHalf ; '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:08 &lt;br /&gt;
|We will store the number in n and the half number in nHalf&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:13&lt;br /&gt;
|  NExt line Type '''n = 5;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:18&lt;br /&gt;
|NExt line Type '''if (n % 2 == 0) {''' Press enter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:28&lt;br /&gt;
|Type '''nHalf = n / 2;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''else {'''&lt;br /&gt;
&lt;br /&gt;
'''nHalf = (n + 1) / 2;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:50&lt;br /&gt;
|We check if the number is even or odd and do the division accordingly.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:55&lt;br /&gt;
|  Now  Let us add a print statement to see the program in action.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:59&lt;br /&gt;
| So  Type '''System.out.println(nHalf);'''&lt;br /&gt;
|-&lt;br /&gt;
|  06:11&lt;br /&gt;
|Now  '''Save''' and '''Run''' the file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:14&lt;br /&gt;
|As we can see, our objective is met. We get the output as 3 and not 2&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:21&lt;br /&gt;
|   But if we notice, all we are doing is, setting the value of a variable depending on a condition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:27&lt;br /&gt;
|There is more syntax than logic in our program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:31&lt;br /&gt;
|This is when ternary operator makes code simpler.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:35&lt;br /&gt;
|   Ternary Operator is a conditional operator providing results similar to nested-if.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:40&lt;br /&gt;
|It Provides a short syntax and is denoted by a question mark.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:45&lt;br /&gt;
| It Takes three operands at a time.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:48&lt;br /&gt;
|   Let us learn about the syntax of Ternary Operator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:53&lt;br /&gt;
|The expression is the condition that has to be checked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:56&lt;br /&gt;
|Operand 1 is the value of the variable Result if the condition is true.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:03&lt;br /&gt;
|Operand 2 is the value if the condition is false.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:09&lt;br /&gt;
| Now Let us use it in our program.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:12&lt;br /&gt;
|First let us remove the if-else statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:17&lt;br /&gt;
|Type '''nHalf = n % 2 == 0 ? n / 2 : (n + 1) / 2''' semi-colon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:41	&lt;br /&gt;
|This statement reads,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:43&lt;br /&gt;
|if n is even, nHalf is n by 2 ,Otherwise, it is n plus 1 by 2.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:50&lt;br /&gt;
|Let us now see it in action.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:52&lt;br /&gt;
|'''Save''' and '''Run'''the file. Press Ctrl S and Ctrl F11  keys&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:59&lt;br /&gt;
| As we can see, the output is as expected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:02&lt;br /&gt;
|This way, ternary operator reduces clutter in the code and improves readability.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:09&lt;br /&gt;
| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:11 &lt;br /&gt;
|In this tutorial we have learnt:&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:13&lt;br /&gt;
|* About Nested-If Statements and Ternary Operator&lt;br /&gt;
|-&lt;br /&gt;
|  08:15&lt;br /&gt;
|* Usage of Nested-If Statements and Ternary Operator in a Java program&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:22	&lt;br /&gt;
|Now take an assignment on &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08 :23&lt;br /&gt;
|Nested-If and Ternary operator. Write java program for the following.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:28	&lt;br /&gt;
|* Check whether a number is even and also a multiple of 11 using nested-if.&lt;br /&gt;
|-&lt;br /&gt;
|  08:34&lt;br /&gt;
|* Identify the largest number among the two given numbers using Ternary operator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:40&lt;br /&gt;
|   To know more about the '''Spoken Tutorial''' project, watch the video available at the following link.&lt;br /&gt;
|-&lt;br /&gt;
|  08:45&lt;br /&gt;
| It summarizes the spoken-tutorial  project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:52&lt;br /&gt;
|| The Spoken Tutorial Project Team. &lt;br /&gt;
|-&lt;br /&gt;
|  08:54&lt;br /&gt;
||Conducts workshops using '''spoken tutorials''' and &lt;br /&gt;
|-&lt;br /&gt;
|  08:57 &lt;br /&gt;
||gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  09:07	&lt;br /&gt;
|   '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and&lt;br /&gt;
|-&lt;br /&gt;
| 09:11&lt;br /&gt;
|It is supported by the '''National Mission on Education through ICT, MHRD, Government of India. &lt;br /&gt;
|-&lt;br /&gt;
|  09:17&lt;br /&gt;
||'''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:26 &lt;br /&gt;
|  This script 	 has been contributed by '''TalentSprint'''.  This is '''Arya Ratish from IIT Bombay signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Arithmetic-Operations/English-timed</id>
		<title>Java/C2/Arithmetic-Operations/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Arithmetic-Operations/English-timed"/>
				<updated>2014-01-01T06:48:56Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; {| border=1&lt;br /&gt;
|| '''Time''''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:01&lt;br /&gt;
|   Welcome to the  tutorial on '''Arithmetic Operations in Java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:05&lt;br /&gt;
| In this tutorial, you will learn about the various   '''Arithmetic Operations ''' namely&lt;br /&gt;
'''Addition'''&lt;br /&gt;
&lt;br /&gt;
'''Subtraction'''&lt;br /&gt;
&lt;br /&gt;
'''Multiplication'''&lt;br /&gt;
&lt;br /&gt;
'''Division''' and &lt;br /&gt;
&lt;br /&gt;
'''How to use them.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:16&lt;br /&gt;
|  For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 11.10''',&lt;br /&gt;
&lt;br /&gt;
'''JDK 1.6''' and &lt;br /&gt;
&lt;br /&gt;
'''Eclipse 3.7'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:24&lt;br /&gt;
|  To follow this tutorial you must have eclipse installed on your system&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:28&lt;br /&gt;
|  and you must  '''know how to create, save and run a file in Eclipse'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:32&lt;br /&gt;
| If not, for relevant tutorial please visit our website as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:42&lt;br /&gt;
|  Here is a list of operators and the mathematical operations they perform&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* plus symbol for addition&lt;br /&gt;
* minus for subtraction&lt;br /&gt;
* asterisk for multiplication&lt;br /&gt;
* and slash for division&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:54&lt;br /&gt;
| We shall look at each of them in detail.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:05&lt;br /&gt;
| Here  We have Eclipse IDE and the skeleton required for the rest of the code. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:10&lt;br /&gt;
| We have created a class by name '''Arithmetic Operations''' and added the '''main '''method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:17&lt;br /&gt;
| Let us add some variables.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:22&lt;br /&gt;
| '''int x = 5;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:26&lt;br /&gt;
| '''int y = 10;'' &lt;br /&gt;
int result&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:35&lt;br /&gt;
| '''x''' and '''y''' will be  the operands  and the  '''result''' will store the output of operations.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   01:41&lt;br /&gt;
|   Let us add them and print the result.''' Result= x+y;''' system. out. println ''''in parantesis '''result''&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
| 02:10&lt;br /&gt;
|  Save it with ''Control S'' and ''control F11'' to''' Run'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:17&lt;br /&gt;
|  We see, that the output of addition has been stored in result and the value has been printed &lt;br /&gt;
|-&lt;br /&gt;
|  02:24&lt;br /&gt;
|  Now Let us change the values  . '''x=75''','''y = 15'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:37&lt;br /&gt;
| '''Save''' it '''Run'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:42&lt;br /&gt;
|  we   see that the output has    changed  accordingly&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:48&lt;br /&gt;
| Now let us try negative values. '''y = -25.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:57&lt;br /&gt;
|  '''Save'''  '''Run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:02&lt;br /&gt;
|   we   see  that the output  of  75  plus  -25 has been printed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:10&lt;br /&gt;
|   Now let us try subtraction. '''y = 5'' and change x+y to x-y&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   03:25&lt;br /&gt;
| '''Save it '''  '''Run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:32&lt;br /&gt;
|  we   see that the output of 75-5 has been printed,  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:38&lt;br /&gt;
| | Now Let us try   multiplication. Change '''minus''' to ''' asterisk'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:46&lt;br /&gt;
|  '''Save''' and '''Run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:52&lt;br /&gt;
|  we  see that  by using   asterisk we could  multiply 75 by 5. . &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:58&lt;br /&gt;
|  Now let us try '''division''' Remove   asterisk and type slash&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|  04:07&lt;br /&gt;
|   '''Save it'''  '''Run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:13&lt;br /&gt;
| As we can see, the output is as expected.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:18&lt;br /&gt;
| Now let us see what happens when the expected result is a decimal point number.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:24&lt;br /&gt;
| Change '''5''' to '''10'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:28&lt;br /&gt;
| The result must be 7.5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:30&lt;br /&gt;
| So let us change the result to a   float.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:43&lt;br /&gt;
|  '''Save it'''  '''Run'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   04:50&lt;br /&gt;
|  Note that although the expected result is 7.5, we get  output as 7.0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:57&lt;br /&gt;
|  This is because both the operands involved in the division are integers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:01&lt;br /&gt;
| | Let us change y to a float. y=10f&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|05:15&lt;br /&gt;
|   '''Save  '''  '''Run'''. &lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|05:21&lt;br /&gt;
|Now we can see that the result is as expected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:24&lt;br /&gt;
|Keep in mind that when the expected result is a float, one of the operands must be a float to get the expected output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:32&lt;br /&gt;
|  Now let us see what happens when there is more than one operator.Remove all the operands&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:48 &lt;br /&gt;
|  int result= 8+4-2. ''Save it ,run''&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|06:09&lt;br /&gt;
|As we can see, the output is as expected.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:12&lt;br /&gt;
| |Now  Change '''minus''' to a '''  slash'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:19&lt;br /&gt;
|Now the output would be 6 if the addition is done before  division.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:25&lt;br /&gt;
|Or it would be 10 if division is done before addition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:30&lt;br /&gt;
|Let us '''Run''' and see the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:38&lt;br /&gt;
|As we can see, the output is 10 and   the division is done before addition. This is because the division operator has more precedence than the addition operator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:50&lt;br /&gt;
|In such situations, if we need to override the precedence, we use parentheses.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:04&lt;br /&gt;
|  By adding parentheses, we instruct Java to do the addition before the division.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:10&lt;br /&gt;
| Let us run the file now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:15&lt;br /&gt;
| As we can see,  addition has been performed first and the output is 6 as expected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:22&lt;br /&gt;
| As a rule, keep in mind to use parentheses when the order of operations is not clear.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:36&lt;br /&gt;
|   This brings us  to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:40&lt;br /&gt;
| we have learnt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:41  &lt;br /&gt;
| '''How to''' '''perform basic mathematical operations in Java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:44&lt;br /&gt;
|  '''  operator precedence, and, '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:45&lt;br /&gt;
| '''How to override it.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:49&lt;br /&gt;
| As an assignment for this tutorial  Find out what is meant by the '''modulo''' operator and what it does.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:57&lt;br /&gt;
| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link,&lt;br /&gt;
|-&lt;br /&gt;
|   08:02&lt;br /&gt;
|   It  summarizes the project. &lt;br /&gt;
|-&lt;br /&gt;
|   08:05&lt;br /&gt;
| If you do not have good bandwidth you can download and watch it&lt;br /&gt;
|-&lt;br /&gt;
|   08:10&lt;br /&gt;
|   The Spoken Tutorial Team. &lt;br /&gt;
|-&lt;br /&gt;
|   08:12&lt;br /&gt;
| Conducts workshops using '''spoken tutorials''' &lt;br /&gt;
|-&lt;br /&gt;
|08:14&lt;br /&gt;
|  Gives certificates to those who pass an online test. &lt;br /&gt;
|-&lt;br /&gt;
|   08:18&lt;br /&gt;
| For more details, please write to '''  spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:24&lt;br /&gt;
| The  '''Spoken Tutorial Project''' is a part of the '''Talk to a Teacher''' project .&lt;br /&gt;
|-&lt;br /&gt;
|   08:29&lt;br /&gt;
| It is supported by the '''National Mission on Education through ICT, MHRD, Government of India. &lt;br /&gt;
|-&lt;br /&gt;
|   08:35&lt;br /&gt;
| '''More information on this Mission is available at the following link '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  08:39&lt;br /&gt;
|  This tutorial has been contributed by '''TalentSprint'''. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-Eclipse/English-timed</id>
		<title>Java/C2/Getting-started-Eclipse/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-Eclipse/English-timed"/>
				<updated>2014-01-01T06:38:02Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1&lt;br /&gt;
|| ''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|   00:01&lt;br /&gt;
|  Welcome to the spoken tutorial on '''Getting started with Eclipse'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:06&lt;br /&gt;
|  In this tutorial we are going to learn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:08&lt;br /&gt;
|How to  Create a project and add a class in Eclipse&lt;br /&gt;
|-&lt;br /&gt;
|  00:12&lt;br /&gt;
| How to write java program and&lt;br /&gt;
|-&lt;br /&gt;
|  00:14&lt;br /&gt;
| How to run a java program in Eclipse&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:18&lt;br /&gt;
|  For this tutorial we are using:&lt;br /&gt;
&lt;br /&gt;
* Ubuntu 11.10, &lt;br /&gt;
* Eclipse 3.7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:25&lt;br /&gt;
| To follow this tutorial you must have &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:28&lt;br /&gt;
|Eclipse installed on your system.&lt;br /&gt;
|-&lt;br /&gt;
|  00:30&lt;br /&gt;
| If not, for relevant tutorial please visit our website as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:39&lt;br /&gt;
|  '''Eclipse''' is an '''Integrated Development Environment '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:42&lt;br /&gt;
|It is a tool on which one can write, debug and run java programs easily.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:50 &lt;br /&gt;
| Now let us open Eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:55&lt;br /&gt;
|Press '''Alt F2''' and in the dialog box, type '''eclipse''' and hit enter.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:08&lt;br /&gt;
|  We get a '''Workspace Launcher''' dialog box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:11&lt;br /&gt;
|A workspace is a location where all your project realated data and your eclipse related files are stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:19&lt;br /&gt;
|There is already a location which is the default location.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:24&lt;br /&gt;
|Using the browse feature, a different directory can also be selected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:27&lt;br /&gt;
|For now let us proceed with the default directory. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:30&lt;br /&gt;
|  Click '''OK '''to proceed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:39&lt;br /&gt;
|You  have the '''Welcome to Eclipse''' page. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:46&lt;br /&gt;
| Click '''Workbench'''  which is  at the top-right corner of the page. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:52&lt;br /&gt;
|And here  we have Eclipse IDE. Now let us add a project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:57&lt;br /&gt;
|  go to '''File ''' '''New'''  select '''Project'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:05&lt;br /&gt;
|  In the list of projects, select '''Java Project'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:10&lt;br /&gt;
|   Also note that, for most of our tutorials, we will be using '''java project. '''Click '''Next'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:19&lt;br /&gt;
|  In the project name, type '''EclipseDemo'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:30&lt;br /&gt;
|  Notice an option that says '''use default location'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:34 &lt;br /&gt;
|   if this option is selected, all the '''EclipseDemo''' project data is stored in the default workspace.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  02:41&lt;br /&gt;
|   If it is unselected, using the browse feature, a different location can also be selected.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:47 &lt;br /&gt;
|For now we’ll use the default location.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:52&lt;br /&gt;
|  click '''Finish''' located at the bottom right corner of the Wizard.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:00&lt;br /&gt;
| We get the '''Open Associated Perspective''' dialog box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:04&lt;br /&gt;
|A perspective refers to the way items are arranged in Eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:09&lt;br /&gt;
|The dialog box is suggesting a perspective that is suited for '''Java''' development.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:20&lt;br /&gt;
|Select '''remember my decision '''and click '''Yes.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:2&lt;br /&gt;
| Here we have '''EclipseIDE''' with the project. Now let us add a class to the project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:37&lt;br /&gt;
|   Right click on the project, '''new '''and select '''class'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:46&lt;br /&gt;
|  In the class name, give '''DemoClass'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:55&lt;br /&gt;
| Notice that in modifiers, we have two options, '''public''' and '''default'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:59&lt;br /&gt;
| For now leave it as public.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:01&lt;br /&gt;
|The other options will be discussed in subsequent tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:06&lt;br /&gt;
|  And in the list of method stubs.  Select the option that says, '''public static void main'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:15&lt;br /&gt;
|   The other options will be discussed in subsequent tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:19&lt;br /&gt;
| click '''Finish''' located at the bottom right corner of the wizard.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:30&lt;br /&gt;
|And  Here we have the class file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  04:35&lt;br /&gt;
|  Notice that there are a lot of partitions. These are called portlets.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:41&lt;br /&gt;
|  We have the '''Package Explorer''' portlet that behaves like a '''File Browser'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:46&lt;br /&gt;
| We have the '''Editor '''portlet in which we write the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:50&lt;br /&gt;
|And the Outline portlet which gives us hierarchy of the project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:56&lt;br /&gt;
| Each portlet can also be resized &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:10&lt;br /&gt;
| They can also  be minimized by using the minimize button&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:26&lt;br /&gt;
|  They can also be restored by using the restore button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:37&lt;br /&gt;
|  Now let us minimize other portlets and focus on the Editor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   05:49&lt;br /&gt;
|  As we can see, there is already some code, Eclipse has generated for us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:54&lt;br /&gt;
|  The code generated here depends on the options we select, while creating the class.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:00&lt;br /&gt;
| Now let us add a  print statement here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:08&lt;br /&gt;
| Type '''System.out.println  (“Hello Eclipse”).'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:26&lt;br /&gt;
|   Add a semicolon at the end of the statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:31&lt;br /&gt;
|  Save the file by clicking  '''File '''and select '''Save'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:37&lt;br /&gt;
|  Alternatively, you can use the shortcut '''Control  S'''  also.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:42&lt;br /&gt;
|  To run this program, right click on the '''editor''', go to '''run as''' and select '''java application'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:56&lt;br /&gt;
|  We see that if somethng is printed, the '''Output''' console shows the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:04&lt;br /&gt;
| If our code had problems,  the problems   would have been shown on the '''Problems''' portlet&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:10&lt;br /&gt;
|  Here is how you write and run a Java program in Eclipse.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:18&lt;br /&gt;
| this brings us to the end of this tutorial&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   07:20&lt;br /&gt;
| In this tutorial, we have learnt how to create project in eclipse and a class to it. How to Write a java source code and how to run a java program in Eclipse.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:33&lt;br /&gt;
| As an assignment  for this tutorial,	 create a new project, by the name '''Display'''&lt;br /&gt;
|-&lt;br /&gt;
| 07:38&lt;br /&gt;
|  And add a class to the  '''Display''' project, by the name '''Welcome '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  07:44&lt;br /&gt;
| For more information on the Spoken Tutorial Project, watch the video available at the following link&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:50&lt;br /&gt;
|  It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:53&lt;br /&gt;
|  If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|    07:58&lt;br /&gt;
| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:59&lt;br /&gt;
|  Conducts workshops using '''spoken tutorials'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:02&lt;br /&gt;
| Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:05&lt;br /&gt;
| For more details, please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:12&lt;br /&gt;
|  ''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:17&lt;br /&gt;
|  It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:23&lt;br /&gt;
|  More information on this Mission is available at the following link&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:27&lt;br /&gt;
|  This tutorial has been contributed by '''TalentSprint''' .Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Instance-fields/English-timed</id>
		<title>Java/C2/Instance-fields/English-timed</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Instance-fields/English-timed"/>
				<updated>2013-12-12T07:05:14Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; {| border=1&lt;br /&gt;
|| ''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:02&lt;br /&gt;
|  Welcome to the Spoken Tutorial on '''Instance Fields''' in '''Java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:06&lt;br /&gt;
| In this tutorial we will learn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:08&lt;br /&gt;
|   About '''instance fields'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:10&lt;br /&gt;
|   To access the '''instance fields '''of a '''class'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:13&lt;br /&gt;
|  '''Modifiers''' for '''instance fields'''&lt;br /&gt;
|-&lt;br /&gt;
| 00:15&lt;br /&gt;
| And Why '''instance fields''' are called so?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  00:18&lt;br /&gt;
|  Here we are using &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:20&lt;br /&gt;
|   Ubuntu version 11.10 &lt;br /&gt;
|-&lt;br /&gt;
| 00:22&lt;br /&gt;
|     jdk 1.6&lt;br /&gt;
|-&lt;br /&gt;
| 00:24&lt;br /&gt;
|  And  Eclipse IDE 3.7.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|   00:27&lt;br /&gt;
|  To follow this tutorial you must know &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:30&lt;br /&gt;
|  how to create a '''class '''in '''Java '''using '''Eclipse'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:33&lt;br /&gt;
|  You must also know how to create an '''object '''for the '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:38&lt;br /&gt;
|  If not, for relevant tutorials please visit our website which is as shown,&lt;br /&gt;
&lt;br /&gt;
('''http'''://'''www.spoken'''-'''tutorial.org''') &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:43&lt;br /&gt;
|  We know that objects store their individual states in''' fields'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:48&lt;br /&gt;
|  These fields are declared without the  '''static'''  keyword.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:51&lt;br /&gt;
|  We will learn about''' static fields''' in the coming tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:55&lt;br /&gt;
|  '''Non-static fields''' are also known as '''''instance variables '''''or''''' instance fields.'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:01&lt;br /&gt;
|   Let us go back to the '''Student class''' we had already created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:09&lt;br /&gt;
|  We can see that here''' roll_no''' and '''name''' are the '''instance fields''' of this '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:15&lt;br /&gt;
|  Now, we will learn how to access these '''fields'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  01:18&lt;br /&gt;
|  For that, let us open the '''TestStudent class '''which we had already created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:27&lt;br /&gt;
|  We can remove the statement for creating the second '''object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:33&lt;br /&gt;
|  We will also remove the '''println '''statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:41&lt;br /&gt;
|  Now we will access the fields '''roll_no''' and '''name'''  of the student class using'''stud1 '''and the''' dot operator'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:49&lt;br /&gt;
|  So for that  type '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes, '''The roll number is''', then ''plus '''''stud1''''' dot ''''' from the option provided select''''' roll_no''''' '' press '''Enter'''  then ''semicolon''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:15&lt;br /&gt;
|  Next line type '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes '''The name is''',   ''plus '''''stud1''''' dot select  '''''name'''''   press '''enter''' ''  then ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:39&lt;br /&gt;
| Now, '''save''' and '''run''' the file '''TestStudent.java'''. So press '''  Ctrl, S''' and '''Ctrl, F11'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:48&lt;br /&gt;
|   We get the output as &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:51&lt;br /&gt;
|  '''The roll number is 0.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:53&lt;br /&gt;
|  '''The name is null.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:00  &lt;br /&gt;
|   This is because, we have not initialized the '''variables''' to any value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:05&lt;br /&gt;
|  In '''Java''', the '''fields''' cannot have random values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:09&lt;br /&gt;
|  After the '''memory''' is allocated for the '''object''' the '''fields''' are initialized to '''null '''or '''zero'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:15&lt;br /&gt;
|  This work is done by the '''constructor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:18&lt;br /&gt;
|  We will learn about '''constructor''' in the coming tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:21&lt;br /&gt;
|  Now, we will initialize the '''fields''' explicitly and see the '''output'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:27&lt;br /&gt;
|So  type,'''int ''' ''' roll_no''' equal to '''50'''  next line string   '''name''' equal to within double quotes '''Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:42&lt;br /&gt;
| | Now, '''save '''and '''run '''the file. Press '''Ctrl,S''' and '''Ctrl F11 '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:50&lt;br /&gt;
|  We get the '''output''' as expected '''The roll number is 50'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:54&lt;br /&gt;
|  '''The name is Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  03:56 &lt;br /&gt;
|This is because we have explicitly initialize the variables  in the '''Student''' class&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:04&lt;br /&gt;
|  We can see that here the '''fields '''have no '''modifier '''or''' '''the''' default modifier'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:10&lt;br /&gt;
|  Recall '''modifiers''' we had discussed in '''Creating Classes.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:14&lt;br /&gt;
|  We can access the fields because both '''Student.java''' and '''TestStudent.java''' are in the same '''package'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:22&lt;br /&gt;
|  We can see that here they are in the same '''default package'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:30&lt;br /&gt;
|  We will learn about '''packages''' in the later tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:34&lt;br /&gt;
| We will now change the modifier to '''private'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:37 &lt;br /&gt;
|  So before the '''field''' declarations type '''private'''. So type '''private int ''' '''roll no=50'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:48&lt;br /&gt;
|  Next line '''private string''' '''name ='''Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:53&lt;br /&gt;
|  Now '''save''' the file '''Student.java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:00&lt;br /&gt;
| | We can see that we get errors in '''TestStudent.java'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:05&lt;br /&gt;
|  Hover the mouse over the error symbol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:08&lt;br /&gt;
|  It says '''The field Student '''''dot '''''roll ''''' '''''number '''is not visible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:12&lt;br /&gt;
| And '''The field Student '''''dot '''''name '''is not visible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:16&lt;br /&gt;
|  This is because private fields can be accessed only within its own class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:23&lt;br /&gt;
|  You can try accessing '''roll_no''' and '''name''' from the '''Student class '''itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:27&lt;br /&gt;
|  You will find that you can access them without any error.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:32&lt;br /&gt;
| Now let us change the '''modifier''' to '''protected'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  05:52&lt;br /&gt;
| Now  '''Save''' the file and '''Run''' the program&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:00&lt;br /&gt;
|  We see the '''output''' on the console. The '''Roll no is 50'''   the name is '''Raju'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:07&lt;br /&gt;
|  This is because '''protected fields''' can be accessed within the same '''package'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:17&lt;br /&gt;
| Now let us see why ''' instance fields''' are called so? &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:22 &lt;br /&gt;
|  '''Instance fields''' are called so because their values are unique to each '''''instance''''' of a class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:29&lt;br /&gt;
|  In other words each object of a class will have unique values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  06:34&lt;br /&gt;
|  Let us go to the '''TestStudent class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:43&lt;br /&gt;
|  Here, we will create one more object of the '''Student class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:50&lt;br /&gt;
|  So type next line'''Student''' space '''stud2''' equal to '''new''' space '''Student''' , opening and closing brackets semicolon.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:06 	&lt;br /&gt;
|  We will now initialize both the objects in the'''TestStudent class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:18&lt;br /&gt;
|  Next line type '''stud1''' ''dot '' select'''roll_no'''  press ''' enter''' equal to '''20 '''  ''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:32&lt;br /&gt;
|  Next line type '''stud1''' ''dot'' select  '''name''' press '''enter''' equal to within double quotes '''Ramu '''''semicolon'' press '''enter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:54&lt;br /&gt;
|  Thus we have initialized the fields for the first object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:58&lt;br /&gt;
|  Now, we will initialize the fields for the second object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:02&lt;br /&gt;
|  So type '''stud2''' ''dot'' select'''roll_no''' equal to '''30 '''  ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:15 &lt;br /&gt;
| Next line   '''stud2''' ''dot'' select '''name''' equal to within double quotes''' Shyamu '''''semicolon'''''  press''' enter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:32&lt;br /&gt;
|  Now after the '''println''' statements, type '''System''' '''dot''' '''out''' dot '''println''' within brackets and double quotes '''The roll number is''',  ''plus '''''stud2 '''''dot  select '''''roll_no''''' ''and  ''semicolon''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:03&lt;br /&gt;
|  '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes '''The name is''',  ''plus '''''stud2 '''''dot select '''''name''''' ''and   ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:28&lt;br /&gt;
|  Now, '''save''' and''' run '''the file. Press ''' Ctrl,s''' and '''Ctrl, F11'''  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:38&lt;br /&gt;
|   We get the output as follows.  The roll_no is '''20'', The name is''' Ramu''' roll_no is '''30''',   name is''' shyamu'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:47&lt;br /&gt;
|  Here both '''stud1''' and '''stud2''' are referring to two different '''objects'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:52&lt;br /&gt;
|  This means that the two '''objects''' have unique values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:56&lt;br /&gt;
|  We can see that here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:57&lt;br /&gt;
|  The first object has the values '''20''' and '''Ramu'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:02&lt;br /&gt;
|  The second object has the values '''30 '''and '''Shyamu''' .&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  10:09&lt;br /&gt;
|   Now, let us create one more '''object.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:13&lt;br /&gt;
|  So type '''Student''' space '''stud3''' equal to '''new''' space '''Student'''  within brackets opening and closing brackets semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:36&lt;br /&gt;
|  We will now, print the values  of the third '''object''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:44&lt;br /&gt;
| So type  '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes '''The  roll_no is''',  ''plus '''''stud3 '''''dot select '''''roll_no'''''     ''semicolon''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:09&lt;br /&gt;
|next line type  '''System''' ''dot'' '''out''' ''dot'' '''println''' within brackets and double quotes '''The  name is''',  ''plus '''''stud3 '''''dot   ''''' name'''''     ''semicolon''.&lt;br /&gt;
|-&lt;br /&gt;
| 11:29&lt;br /&gt;
|  Now,''' save''' and '''run''' the file. So press '''Ctrl, S''' and '''Ctrl, F11''' .&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:36 &lt;br /&gt;
| We  can see that the third '''object''' contains the values''' 50''' and '''Raju.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  11:46&lt;br /&gt;
|  This is because we had explicitly initialized the fields of the '''Student''' class to''' 50''' and ''' Raju'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:54&lt;br /&gt;
|  Now, try de-initializing the fields and see the output for the third object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  12:02&lt;br /&gt;
| So in this tutorial, we learnt &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:05&lt;br /&gt;
|   About instance fields.&lt;br /&gt;
|-&lt;br /&gt;
| 12:07&lt;br /&gt;
|  Accessing the fields using dot operator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  12:11&lt;br /&gt;
| | For self assessment,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:13&lt;br /&gt;
|  Create an  object emp2 in the Test Employee class already created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:18&lt;br /&gt;
|  Then initialize the values of the two objects using dot operator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:23&lt;br /&gt;
|  Use 55 and Priya as values for first object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:27&lt;br /&gt;
|  Use 45 and Sandeep as values for second object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:31&lt;br /&gt;
|  Display the values for both the objects in the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  12:34&lt;br /&gt;
|  To know more about the Spoken Tutorial Project&lt;br /&gt;
|-&lt;br /&gt;
| 12:37&lt;br /&gt;
|   Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
|-&lt;br /&gt;
| 12:40&lt;br /&gt;
|   It summarizes the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:43&lt;br /&gt;
|   If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|    12:47&lt;br /&gt;
| The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|12:49 &lt;br /&gt;
|   Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  12:52&lt;br /&gt;
|  Gives certificates for those who pass an online test &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 12:56&lt;br /&gt;
|   For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  13:01&lt;br /&gt;
|   Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:05&lt;br /&gt;
|  It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:11&lt;br /&gt;
|   More information on this Mission is available at &lt;br /&gt;
  [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  13:09&lt;br /&gt;
|  Thus we have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 13:22 &lt;br /&gt;
|  This is Arya Ratish from IIT Bombay signing off.   Thanks for joining.&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Overview-of-Library-Management-System/English</id>
		<title>Java-Business-Application/C2/Overview-of-Library-Management-System/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Overview-of-Library-Management-System/English"/>
				<updated>2013-09-24T10:36:52Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: Created page with ''''Title of script''': Overview of the Web Application  '''Author: arya '''  '''Keywords: Library Management System, Overview tutorial,video tutorial'''   {| style=&amp;quot;border-spacin…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Overview of the Web Application&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: Library Management System, Overview tutorial,video tutorial'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on the''' Overview of the Web Application – Library Management System.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we introduce you to a web application. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this series, we have demonstrated how to create a basic inventory system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have used the example of a Library Management system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To learn this series, you must have knowledge of &lt;br /&gt;
&lt;br /&gt;
* Core Java using Netbeans IDE and&lt;br /&gt;
* HTML&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Library Management System&lt;br /&gt;
&lt;br /&gt;
A '''library management system''' is a '''system''' which &lt;br /&gt;
&lt;br /&gt;
* manages the issuing and returning of '''books'''&lt;br /&gt;
* manages the '''users''' of a '''library.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us look at our''' web application – the Library Management System.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''library management system''' is a '''system''' which &lt;br /&gt;
&lt;br /&gt;
* manages the issuing and returning of '''books''' and &lt;br /&gt;
* manages the '''users''' of a '''library.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Objectives&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Why do we need a '''Library Management System?'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The use of such a system helps - &lt;br /&gt;
&lt;br /&gt;
* The librarian to manage the books in the library easily&lt;br /&gt;
* To maintain membership information on one centralized server&lt;br /&gt;
* To save time and resources and&lt;br /&gt;
* To reduce the workload&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch to '''Netbeans IDE'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let me quickly show you the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this, I will switch to the '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have a very simple system here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me '''run '''this '''Project '''named '''MyFirstProject. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Browser window&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| The browser window opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the '''Home Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see the '''Home Page '''of '''Library Management System.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the '''login form'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see a very simple '''login form '''here'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the link.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| There is a link to a page called '''Visitor’s Home Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on the '''link.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on the '''link.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the '''Visitor’s Home Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see the list of all the '''books '''available in the '''library.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the '''Login block.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| A '''library''' has many '''members'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So now, let us login as a '''member''', i.e. as a user who has registered already.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Login as username = mdhusein&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| I will login as '''“mdhusein”''' and give the password and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the '''Success Greeting Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see a '''Success Greeting Page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We also have the '''list '''of '''books '''currently borrowed by this '''user.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on logout link.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us logout now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Login as '''admin.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Next, we shall '''login '''as the '''librarian '''i.e. as '''admin.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the '''Admin Section Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| As soon as we login, we can see the '''Admin Section page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see 4 options here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us try each one and see the results.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to '''List Books '''and click'''.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| First, we have the option '''List Books'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to all the '''books.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We get the list of all the books''' '''available in the '''library.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to '''List Borrowed Books '''and click'''.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Next, we have '''List Borrowed Books.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to list of books issued.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we get the list of books issued to different '''members.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to list of books which are past their''' return date.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| And the list of books,''' '''which are past their''' return date.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to '''List Users.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then we have the option '''List Users.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we get the list of all the '''users''' who have registered in the '''library'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to '''Checkout/Return Book '''and click'''.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then, here we have the option to '''Checkout/Return a Book.'''&lt;br /&gt;
&lt;br /&gt;
Let’s click on this option.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Checkout/Return Book.'''&lt;br /&gt;
&lt;br /&gt;
interface&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This is the interface to '''Checkout/Return Book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch to login page&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let us come back to our '''login page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the registeration page link.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Notice, we also have an option to register as a new user.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''here.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''here '''to register.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the registration form&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This is the '''registration form '''to '''register '''as a new '''user.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| So, this is the overview of this simple web application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| What you will learn?&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| At the end of this series, you will learn to create this simple '''Library Management System.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will also be able to add more functionalities to it, like searching for a book.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| What you will learn?&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this series -&lt;br /&gt;
&lt;br /&gt;
* we will be using '''JSP and servlets''' to build the '''web application'''&lt;br /&gt;
* you will also learn the''' MVC architecture''' in detail and&lt;br /&gt;
* you will be able to develop any web application which follows the''' MVC''' pattern.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| * Watch the video available at the following link&lt;br /&gt;
* It summarizes the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
Acknowledgment&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* http://spoken-tutorial.org/NMEICT- Intro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10&lt;br /&gt;
&lt;br /&gt;
Contributor slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Library Management System has been contributed by a leading software MNC, through their Corporate Social Responsibility programme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They have also validated the content for this Business Application series.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Issuing-and-Returning-a-book/English</id>
		<title>Java-Business-Application/C2/Issuing-and-Returning-a-book/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Issuing-and-Returning-a-book/English"/>
				<updated>2013-09-24T06:05:22Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: Created page with ''''Title of the script: Issuing and returning a book'''  '''Author:arya'''  '''Keywords:issuing, returning, book'''    {| style=&amp;quot;border-spacing:0;&amp;quot; | style=&amp;quot;border:1pt solid #000…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script: Issuing and returning a book'''&lt;br /&gt;
&lt;br /&gt;
'''Author:arya'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords:issuing, returning, book'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Visual Cue'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Welcome to the spoken-tutorial on '''Issuing and returning a book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| In this tutorial, we will learn how to :&lt;br /&gt;
&lt;br /&gt;
* Fetch all the user details&lt;br /&gt;
* Issuing a book&lt;br /&gt;
* Returning a book&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 3 &lt;br /&gt;
&lt;br /&gt;
Software Requirements&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Here we are using&lt;br /&gt;
&lt;br /&gt;
# Ubuntu Version 12.04&lt;br /&gt;
# Netbeans IDE 7.3&lt;br /&gt;
# JDK 1.7&lt;br /&gt;
# Firefox web-browser 21.0&lt;br /&gt;
&lt;br /&gt;
You can use any web-browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| To follow this tutorial you must have knowledge of&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Basics of '''Java Servlets '''and '''JSPs'''&lt;br /&gt;
# Creating and viewing inventories &lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| In the earlier tutorial, we had seen how the '''Admin Section''' works.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, in this tutorial we have added more functionalities to the '''Admin Section.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch to the '''browser.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us switch to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Login as the '''admin.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us login again as the '''admin.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the two options in the '''Admin Section Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see that we have two more options in the '''Admin Section Page - List Users '''and '''Checkout/Return Book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Come to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let us come to the '''IDE. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Go to '''adminSection '''''dot '''''jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Go to '''adminSection '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;input type&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;radio&amp;quot; name&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;menuselection&amp;quot; value&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;listusers&amp;quot;&amp;gt;List Users&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;input type&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;radio&amp;quot; name&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;menuselection&amp;quot; value&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;checkoutbook&amp;quot;&amp;gt;Checkout/Return Book&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see that there are two more '''radio buttons.'''&lt;br /&gt;
&lt;br /&gt;
One for '''List Users '''and the other for '''Checkout/Return Book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch back to the '''browser.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the radio button for '''List Users.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will click on the '''radio button '''for '''List Users.''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the '''list '''of all the '''users.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| It has all the details like '''First Name, Surname, Age, Gender and Username.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| The steps are similar to the earlier two options.&lt;br /&gt;
&lt;br /&gt;
We saw them in the previous tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Checkout/Return Book.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let us click on the next option which is to '''Checkout '''or '''Return Book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We get a '''form '''which allows you to '''checkout '''as well as '''return book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will now see the code for the same.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''(menuSelection.equals(&amp;quot;checkoutbook&amp;quot;))'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We clicked on '''Checkout/Return Book.'''&lt;br /&gt;
&lt;br /&gt;
So '''menuselection '''is equal to '''Checkout/Return Book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''RequestDispatcher requestDispatcher = req.getRequestDispatcher(&amp;quot;checkOut.jsp&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''requestDispatcher.forward(req, resp);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The steps are the same that we saw for '''List Books.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But here, we forward the '''request '''to '''checkOut.jsp '''using '''RequestDispatcher.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Go to '''checkout.jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let us come to '''checkOut '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;input type&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;radio' name&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;bkgroup1' value&amp;lt;nowiki&amp;gt;=&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getBookId&amp;lt;nowiki&amp;gt;()%&amp;gt; /&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This page is similar to that of '''listBooks '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
Except that we have a '''radio button '''against each '''book.'''&lt;br /&gt;
&lt;br /&gt;
So that we can '''Checkout/Return '''a '''book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''User name&amp;lt;nowiki&amp;gt;:&amp;lt;&amp;lt;/nowiki&amp;gt;input type&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;text' name&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;username' value&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;%=&amp;lt;/nowiki&amp;gt;checkout.getUserName()%&amp;gt;&amp;quot;&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We have a '''username field '''to get the '''username '''of the '''user '''who has to '''checkout book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''Date of Return&amp;lt;nowiki&amp;gt;:&amp;lt;&amp;lt;/nowiki&amp;gt;input type&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;text&amp;quot; name&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;dateofreturn&amp;quot; value&amp;lt;nowiki&amp;gt;=&amp;lt;%= &amp;lt;/nowiki&amp;gt;sevenDaysAfterNowString %&amp;gt; /&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We also have a '''Date field '''to set the '''return date '''of the book.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;% &amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''SimpleDateFormat dateFormatter = new SimpleDateFormat();'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Date today = new Date();'''&lt;br /&gt;
&lt;br /&gt;
'''String todayString = dateFormatter.format(today);'''&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(todayString);'''&lt;br /&gt;
&lt;br /&gt;
'''Calendarcalendar = new GregorianCalendar();'''&lt;br /&gt;
&lt;br /&gt;
'''calendar.add(Calendar.DAY_OF_YEAR, 7);'''&lt;br /&gt;
&lt;br /&gt;
'''Date sevenDaysAfterNow = calendar.getTime();'''&lt;br /&gt;
&lt;br /&gt;
'''String sevenDaysAfterNowString = dateFormatter.format(sevenDaysAfterNow);%&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We set the return date as one week from current date.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is done using the class '''Calendar.'''&lt;br /&gt;
&lt;br /&gt;
The add function of the class takes two parameters.&lt;br /&gt;
&lt;br /&gt;
First is the present day of the year.&lt;br /&gt;
&lt;br /&gt;
Second is the number of days to be added to the present day.&lt;br /&gt;
&lt;br /&gt;
We have added seven days.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;form action&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;CheckOutServlet' method&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;POST'&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now note that the '''form action '''is equal to '''CheckoutServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch back to the '''browser.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let us come back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on the '''radio button '''against '''Book ID 1.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will now click on '''BookId 1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type the '''username '''as '''arya.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type the '''username '''as '''arya. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to '''Return Date.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We see that the''' return date '''is one week from today’s date.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to '''Available copies 9.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Note that the number of '''Available Copies '''is '''9.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Checkout Book.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Checkout Book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to '''Checkout Success Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We get the '''Checkout Success Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''here '''to come back to '''Admin Section Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will click on '''here '''to come back to '''Admin Section Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Checkout/Return Book.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Again click on '''Checkout/Return Book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see that the number of '''Available Copies '''reduces to '''8.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will see the code for this now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Come back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Come back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Go to '''CheckoutServlet.java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Go to '''CheckoutServlet.java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt; errorMsgs = new ArrayList&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt;();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Note that we have set the '''errorMsgs list.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''request.setAttribute(&amp;quot;errorMsgs&amp;quot;, errorMsgs);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We have set the '''errorMsgs '''in the '''request.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''String userName = request.getParameter(&amp;quot;username&amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We get the '''username '''from the '''request using getParameter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''String checkout_book = request.getParameter(&amp;quot;checkout&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''String return_book = request.getParameter(&amp;quot;return&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''//String dateOfCheckout&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(&amp;quot;dateofcheckout&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''String returndate&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(&amp;quot;dateofreturn&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''String id = request.getParameter(&amp;quot;bkgroup1&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Similarly we get the '''checkout_book, return_book, returndate '''and '''book id.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''int book_id = Integer.parseInt(id);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Next, we parse the '''BookId '''as '''Integer '''from the '''Id.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (userName.length() == 0) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;Please enter the user name&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''if (id.length() == 0) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;Please click on the book you want to checkout&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We validate the '''username '''and '''book id.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (checkout_book == null &amp;amp;&amp;amp; return_book == null) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;Please select either checkout/return option!&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We also validate if '''Checkout_book '''and '''Return_Book '''is '''null.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (checkout_book != null || return_book != null) {'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then, we validate if either of them is not '''null.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''userExists = userExists(con, userName);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we check if the '''user '''exists in the''' system '''using '''userExists method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We then store the returned value of the '''method '''in '''userExists variable.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Come to '''userExists method.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, we will see what we do in this '''method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''stmt = con.prepareStatement(&amp;quot;select username from Users where username&amp;lt;nowiki&amp;gt;=?&amp;quot;);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''stmt.setString(1, userName);'''&lt;br /&gt;
&lt;br /&gt;
'''ResultSet rsUser = stmt.executeQuery();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| First we execute the query to check if the '''username '''exists in the '''table.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''int userExists = 0;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here we initialize the '''integer variable''' '''userExists '''to '''0.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (rsUser.next()) {'''&lt;br /&gt;
&lt;br /&gt;
'''userExists = 1;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''return userExists&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| If the '''username '''exists we set '''userExists '''to '''1.'''&lt;br /&gt;
&lt;br /&gt;
We then return the value of '''userExists.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (userExists == 0) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;User does not exist in system&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| So, if the '''method '''returns '''0, '''it means the '''user '''does not exist in the system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''else {'''&lt;br /&gt;
&lt;br /&gt;
'''bookIssued = bookAlreadyIssued(con, userName, book_id);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| If user exists then we call the '''bookAlreadyIssued method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We then store the returned value of the '''method '''in '''bookIssued.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we check if the same '''book '''has already been issued by the same''' user'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let us come to '''bookAlreadyIssued method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''int bookAlreadyIssued = 0;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we have set an '''integer variable bookAlreadyIssued '''to '''0.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''pst = con.prepareStatement(&amp;quot;select book_id from Checkout where Username&amp;lt;nowiki&amp;gt;=? &amp;lt;/nowiki&amp;gt;and book_id&amp;lt;nowiki&amp;gt;=?&amp;quot;);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''pst.setString(1, userName);'''&lt;br /&gt;
&lt;br /&gt;
'''pst.setInt(2, book_id);'''&lt;br /&gt;
&lt;br /&gt;
'''rsBooks = pst.executeQuery();'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We execute the query to check if a '''book '''with the same '''bookid '''is issued by the same '''user.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We get '''bookid '''from '''Checkout '''table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (rsBooks.next()) { '''&lt;br /&gt;
&lt;br /&gt;
'''bookAlreadyIssued = 1;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| If '''BookId '''exists then, set the variable '''bookAlreadyIssued '''to '''1.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We then return the value of '''bookAlreadyIssued.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''method '''returns '''1 '''then it means the same user has already borrowed this book.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, come back to the''' browser.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, come back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
Let us now try to '''checkout '''the same '''book '''by the same '''user.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Again type the '''username '''as '''arya.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type the '''username '''as '''arya.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''BookId 1.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on the radio button against '''BookId 1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then click on '''Checkout book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''Please correct the following errors!!!! '''&lt;br /&gt;
&lt;br /&gt;
''' &amp;lt;nowiki&amp;gt; [&amp;lt;/nowiki&amp;gt;The same user has already borrowed this book!]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We see that we get '''error message '''that''' the same user has already borrowed this book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, switch back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (userExists == 1 &amp;amp;&amp;amp; checkout_book != null) {'''&lt;br /&gt;
&lt;br /&gt;
'''checkout(con, book_id, bookIssued, request, userName, response, errorMsgs);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| If '''userExists '''in the system and if '''checkout_book '''is not '''null, '''we call '''checkout method.''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Come to '''checkout method.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us see what we do in this '''method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''pst = con.prepareStatement(&amp;quot;select bookname,availablecopies from Books where id&amp;lt;nowiki&amp;gt;=?&amp;quot;);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''pst.setInt(1, book_id);'''&lt;br /&gt;
&lt;br /&gt;
'''rsBookById = pst.executeQuery();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we get the '''availablecopies '''for corresponding '''id.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We get this from the '''Books table.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (rsBookById.next()) {'''&lt;br /&gt;
&lt;br /&gt;
'''availableCopies = rsBookById.getInt(2);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We then store the number of '''availablecopies '''into the '''variable''' '''availableCopies.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (availableCopies &amp;gt; 0) {'''&lt;br /&gt;
&lt;br /&gt;
'''if (bookIssued == 0) {'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We check if '''availableCopies '''is greater than '''0 '''and '''bookIssued '''''is equal to '''''0.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight''' String returndate = request.getParameter(&amp;quot;dateofreturn&amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We get the '''dateofreturn '''from the '''request '''and store in the '''returndate.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''insertIntoCheckout(con, book_id, userName, returndate);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We then, call the '''insertIntoCheckout method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will see what we do in this '''method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''private void insertIntoCheckout(Connection con, int book_id, String userName, String returndate) throws SQLException, ParseException {'''&lt;br /&gt;
&lt;br /&gt;
'''PreparedStatement pst2 = null&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''pst2 = con.prepareStatement(&amp;quot;insert into Checkout values(null,?,?,?)&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''pst2.setInt(1, book_id);'''&lt;br /&gt;
&lt;br /&gt;
'''pst2.setString(2, userName);'''&lt;br /&gt;
&lt;br /&gt;
'''pst2.setDate(3, new java.sql.Date(getDateFormat().parse(returndate).getTime()));'''&lt;br /&gt;
&lt;br /&gt;
'''pst2.executeUpdate();'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we store the '''book_id, userName and returndate '''into the '''Checkout table.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''decrementAvailableCopies(availableCopies, con, book_id);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then we call '''decrementAvailableCopies method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will see what we do in this '''method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''private void decrementAvailableCopies(int oldcopies, Connection con, int book_id) throws SQLException {'''&lt;br /&gt;
&lt;br /&gt;
'''PreparedStatement pst4 = null&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''oldcopies -= 1;'''&lt;br /&gt;
&lt;br /&gt;
'''pst4 = con.prepareStatement(&amp;quot;update Books set availablecopies&amp;lt;nowiki&amp;gt;=? &amp;lt;/nowiki&amp;gt;where id&amp;lt;nowiki&amp;gt;=?&amp;quot;);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''pst4.setInt(1, oldcopies);'''&lt;br /&gt;
&lt;br /&gt;
'''pst4.setInt(2, book_id);'''&lt;br /&gt;
&lt;br /&gt;
'''pst4.executeUpdate();'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we execute query to decrement the '''availablecopies '''in the''' Books table '''by '''1. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''setCheckoutIntoRequest(book_id, userName, request);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We call the '''setCheckoutIntoRequest method.'''&lt;br /&gt;
&lt;br /&gt;
Let us come to this method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''private void setCheckoutIntoRequest(int book_id, String userName, HttpServletRequest request) {'''&lt;br /&gt;
&lt;br /&gt;
'''CheckOut checkOut = new CheckOut();'''&lt;br /&gt;
&lt;br /&gt;
'''checkOut.setBookId(book_id);'''&lt;br /&gt;
&lt;br /&gt;
'''checkOut.setUserName(userName);'''&lt;br /&gt;
&lt;br /&gt;
'''request.setAttribute(&amp;quot;checkout&amp;quot;, checkOut);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| In this method, we set the '''checkout attribute '''into the '''request.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''RequestDispatcher view = request'''&lt;br /&gt;
&lt;br /&gt;
'''.getRequestDispatcher(&amp;quot;successCheckout.jsp&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''view.forward(request, response);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then we we forward the '''request '''to '''successCheckout.jsp '''using '''RequestDispatcher.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''else {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;There are no copies of the requested book available.&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| If '''availableCopies '''is '''0, '''then we print '''There are no copies of the requested book available.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Go to '''successCheckout.jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let us come to '''successCheckout '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''CheckOut checkout = (CheckOut)request.getAttribute(&amp;quot;checkout&amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, first we get the '''checkout attribute '''from the '''request.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''Your request to checkout Book ID&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;i&amp;lt;nowiki&amp;gt;&amp;gt; &amp;lt;%=&amp;lt;/nowiki&amp;gt;checkout.getBookId&amp;lt;nowiki&amp;gt;() %&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;i&amp;gt; by &amp;lt;nowiki&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;checkout.getUserName() %&amp;gt; was successful.'''&lt;br /&gt;
&lt;br /&gt;
'''Click&amp;lt;nowiki&amp;gt; &amp;lt;&amp;lt;/nowiki&amp;gt;a href&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;adminsection.jsp'&amp;gt;here&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;a&amp;gt; to try another checkout/return&amp;lt;nowiki&amp;gt;.&amp;lt;&amp;lt;/nowiki&amp;gt;br/&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We then, display the success message for successful '''Checkout.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| You can try out the different errors by yourself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch to the '''browser.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let us '''return '''the '''book.So switch to the browser'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''bookId 1 '''and type the username as '''arya.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''bookId 1 '''and type the username as '''arya.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Return book.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then, click on '''Return book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''Your request to return Book ID'' 1'' by User ID arya was successful'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We get the '''success message '''that '''book''' has been successfully returned.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''here '''for another '''checkout/return.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''here '''for another '''checkout/return.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| So, we come back to the '''Admin Section Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Checkout/Return Book.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Checkout/Return Book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight the number of available copies.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see that the number of available copies for '''book id 1 '''has been incremented.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will see the code for this.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, let us come back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Open '''CheckoutServlet '''''dot '''''java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Open '''CheckoutServlet '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''else if (userExists == 1 &amp;amp;&amp;amp; return_book != null) {'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We check if '''userExists '''''is equal to '''''1 '''and '''return_book '''''is not equal to '''''null.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''returnBook(con, book_id, bookIssued, userName, request, response, errorMsgs);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then we call '''returnBook method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us come to this method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''pst = con.prepareStatement(&amp;quot;select totalcopies,availablecopies from Books where id&amp;lt;nowiki&amp;gt;=?&amp;quot;);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''pst.setInt(1, book_id);'''&lt;br /&gt;
&lt;br /&gt;
'''rsBooks = pst.executeQuery();'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we select the '''totalcopies '''and '''availablecopies '''from '''Books '''for the '''book id.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if (rsBooks.next()) {'''&lt;br /&gt;
&lt;br /&gt;
'''totcopies = rsBooks.getInt(1);'''&lt;br /&gt;
&lt;br /&gt;
'''availcopies = rsBooks.getInt(2);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We store the '''totalcopies '''and '''availablecopies '''to '''totcopies '''and '''availcopies.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''if ((availcopies&amp;lt;nowiki&amp;gt; + 1) &amp;lt;= &amp;lt;/nowiki&amp;gt;totcopies) {'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then we check if '''available copies '''exceed the '''totalcopies.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us come back to the browser.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us now return a book for a '''user '''who has not borrowed the '''book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type the username as '''mdhusein.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type the username as '''mdhusein.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on the '''book id 1.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on the '''book id 1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Return Book.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then click on '''Return Book.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''Please correct the following errors!!!! '''&lt;br /&gt;
&lt;br /&gt;
''' &amp;lt;nowiki&amp;gt; [&amp;lt;/nowiki&amp;gt;The given user has not borrowed this book!]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see that we get the '''error message '''here.'''The given user has not borrowed this book!!'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Come back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, come back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight''' if (bookIssued == 1) {'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we check if the '''bookIssued variable '''''is equal to '''''1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''removeFromCheckout(con, userName, book_id);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We then call the '''removeFromCheckout method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us come to this method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''private void removeFromCheckout(Connection con, String username, int book_id) throws SQLException {'''&lt;br /&gt;
&lt;br /&gt;
'''PreparedStatement pst2 = null&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''pst2 = con.prepareStatement(&amp;quot;delete from Checkout where username&amp;lt;nowiki&amp;gt;=? &amp;lt;/nowiki&amp;gt;and book_id&amp;lt;nowiki&amp;gt;=?&amp;quot;);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''pst2.setString(1, username);'''&lt;br /&gt;
&lt;br /&gt;
'''pst2.setInt(2, book_id);'''&lt;br /&gt;
&lt;br /&gt;
'''pst2.executeUpdate();'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we execute the query to delete from '''Checkout table '''the entry which has checked out a book.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''incrementAvailableCopies(availcopies, con, book_id);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we call the '''incrementAvailableCopies method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us come to this method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''private void incrementAvailableCopies(int availcopies, Connection con, int book_id) throws SQLException {'''&lt;br /&gt;
&lt;br /&gt;
'''PreparedStatement pst4 = null&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''availcopies += 1;'''&lt;br /&gt;
&lt;br /&gt;
'''pst4 = con.prepareStatement(&amp;quot;update Books set availablecopies&amp;lt;nowiki&amp;gt;=? &amp;lt;/nowiki&amp;gt;where id&amp;lt;nowiki&amp;gt;=?&amp;quot;);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''pst4.setInt(1, availcopies);'''&lt;br /&gt;
&lt;br /&gt;
'''pst4.setInt(2, book_id);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''pst4.executeUpdate();'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we increment the '''availablecopies '''by 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We execute the query to update in the '''Books table.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''setReturnIntoRequest(book_id, userName, request);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then we call the '''setReturnIntoRequest method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us come to this '''method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''private void setReturnIntoRequest(int book_id, String userName, HttpServletRequest request) {'''&lt;br /&gt;
&lt;br /&gt;
'''CheckOut checkOut = new CheckOut();'''&lt;br /&gt;
&lt;br /&gt;
'''checkOut.setBookId(book_id);'''&lt;br /&gt;
&lt;br /&gt;
'''checkOut.setUserName(userName);'''&lt;br /&gt;
&lt;br /&gt;
'''request.setAttribute(&amp;quot;returnBook&amp;quot;, checkOut);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Here, we set the '''returnBook attribute '''into the '''request.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight '''RequestDispatcher view = request.getRequestDispatcher(&amp;quot;successReturn.jsp&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''view.forward(request, response);'''&lt;br /&gt;
&lt;br /&gt;
'''} '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then we forward to the '''successReturn page '''using the '''RequestDispatcher.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| The '''successReturn page '''is similar to that we had for '''successCheckout page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| come back to the login page.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, come back to the browser. Come back to the login page.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to '''Visitor’s Home Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see that we have a link called '''Visitor’s Home Page. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Visitor’s Home Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| click on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point list of all the books.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can see that we get a list of all the books available.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| In this tutorial we have learnt:&lt;br /&gt;
&lt;br /&gt;
* To list all the users&lt;br /&gt;
* To fetch a book&lt;br /&gt;
* To return a book.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Watch the video available at the following link.&lt;br /&gt;
&lt;br /&gt;
# It summarizes the Spoken Tutorial Project&lt;br /&gt;
# If you do not have good bandwidth you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
# Conducts workshops using spoken tutorials&lt;br /&gt;
# Gives certificates for those who pass an online test&lt;br /&gt;
# For more details please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Acknowledgement&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher Project&lt;br /&gt;
&lt;br /&gt;
# It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
# More information on this mission is available at&lt;br /&gt;
# http://spoken-tutorial.org/NMEICT-Intro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
Contributor Slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Library Management System has been contributed by a leading software MNC, through their Corporate Social Responsibility Programme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They have also validated the content for this spoken tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Database-and-validation/English</id>
		<title>Java-Business-Application/C2/Database-and-validation/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Database-and-validation/English"/>
				<updated>2013-09-16T10:51:58Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: Created page with ''''Title of script''': Database and validation  '''Author: arya '''  '''Keywords: servlets, video tutorial, database,validation'''    {| style=&amp;quot;border-spacing:0;&amp;quot; | style=&amp;quot;border…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Database and validation&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: servlets, video tutorial, database,validation'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken-tutorial on''' Database and validation.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn to:&lt;br /&gt;
&lt;br /&gt;
* Interact with database&lt;br /&gt;
* Validate the fields &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
Software Requirements&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Here we are using&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Version 12.04&lt;br /&gt;
* Netbeans IDE 7.3&lt;br /&gt;
* JDK 1.7&lt;br /&gt;
* Firefox web-browser 21.0&lt;br /&gt;
&lt;br /&gt;
You can use any web-browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| To follow this tutorial you must have knowledge of&lt;br /&gt;
&lt;br /&gt;
* Basics of '''Java Servlets '''and '''JSPs'''&lt;br /&gt;
* '''MySQL Database '''connection in '''Netbeans IDE'''&lt;br /&gt;
* Creating '''database '''and '''tables'''&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''Netbeans IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Let us go to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''MySQL Server.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have started the '''MySQL server.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''library.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have created a '''database '''named '''library.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''users.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have created a '''table '''in it''' '''named '''Users.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have already inserted some values into this table.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I will show them now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''Users.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For that, right click on '''Users '''and click on '''View Data.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''Output '''button at the bottom.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Scroll down'''.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that we have '''10 users '''here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to all the columns.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, we can see the '''FirstName, Surname, Age, Gender, Email, Username '''and '''Password. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us load the '''JDBC''' driver that is '''Java Database Connectivity Driver.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the '''Projects tab.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the '''Projects tab.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''Libraries tab.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''Libraries tab.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add Library.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add Library.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''MySQL JDBC Driver.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''MySQL JDBC Driver.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add Library.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Add Library.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This will load the '''JDBC Driver.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us '''run '''the '''Project '''as we had done earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''username '''as '''arya '''and '''password '''as '''arya123*.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let me type the '''username '''as '''arya '''and '''password '''as '''arya123*.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Sign In.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Sign In.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see the '''successGreeting '''page.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''here '''to logout.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''here '''to logout.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us switch back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Go to '''GreetingServlet '''''dot '''''java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will go to '''GreetingServlet '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''String username = request.getParameter(&amp;quot;userName&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''String password = request.getParameter(&amp;quot;password&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We get the '''Username '''and '''Password '''from the '''request '''using '''getParameter method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next we will see the code for '''JDBC connection.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''Connection con = null&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''PreparedStatement stmt = null&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''ResultSet rs = null&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have initialized the '''Connection object, PreparedStatement object '''and '''Resultset object '''to '''null.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''Class.forName(&amp;quot;com.mysql.jdbc.Driver&amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we '''register '''the '''driver '''in our '''program.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''con = DriverManager.getConnection(&amp;quot;jdbc:mysql://127.0.0.1:3306/library&amp;quot;, &amp;quot;root&amp;quot;, &amp;quot;root&amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we create a connection to the '''database.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''stmt = con.prepareStatement(&amp;quot;select * from Users where username = ? and password = ?&amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, we execute the '''prepareStatement method '''on the '''Connection object.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We give the query to get the '''user details '''from '''Users table.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We check if '''username '''and '''password '''is same as that which is entered in the form.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''question mark.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The question mark denotes each field in the database.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''stmt.setString(1, username);'''&lt;br /&gt;
&lt;br /&gt;
'''stmt.setString(2, password);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To supply values in place of question mark, we execute the '''setString method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We do this using the '''PreparedStatement object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''rs&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;stmt.executeQuery();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we execute the '''executeQuery method '''on the '''ResultSet object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''RequestDispatcher view = request.getRequestDispatcher(&amp;quot;successGreeting.jsp&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''view.forward(request, response);'''&lt;br /&gt;
&lt;br /&gt;
'''return&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For successful login, we display the '''successGreeting page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''RequestDispatcher.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this, we use the '''RequestDispatcher interface.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''RequestDispatcher Interface'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| * This '''interface '''provides the facility of dispatching the '''request '''to another resource.&lt;br /&gt;
&lt;br /&gt;
* The resource can be '''html, servlet '''or '''jsp.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''RequestDispatcher view = request.getRequestDispatcher(&amp;quot;successGreeting.jsp&amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We use the '''getRequestDispatcher method '''on the '''request '''to obtain the '''RequestDispatcher object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''view.forward(request, response);'''&lt;br /&gt;
&lt;br /&gt;
'''return&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We then invoke the '''forward method '''on '''RequestDispatcher.'''&lt;br /&gt;
&lt;br /&gt;
In this way, we '''forward '''to '''successGreeting '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come to '''successGreeting '''''dot '''''jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us come to '''successGreeting '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;p&amp;gt; You have successfully logged in&amp;lt;nowiki&amp;gt;!!!&amp;lt;/&amp;lt;/nowiki&amp;gt;p&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, we are displaying the success message '''You have successfully logged in.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come back to the '''browser.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, come back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Again type a '''username '''and '''password '''that we have not included in the '''database.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''Jai '''as the '''username '''and '''jai123* '''as the '''password.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, let me type '''abc '''as the '''username '''and '''abc123* '''as the '''password.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| click on '''Sign In.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Again click on '''Sign In.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the error message.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that we get the '''error message '''on the same page itself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us see the code for this. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Go to '''GreetingServlet '''''dot '''''java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Go to '''GreetingServlet '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| If the '''validation '''fails, then we should display the '''error messages.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt; errorMsgs = new ArrayList&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt;();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have first initialized a '''List '''of '''errorMsgs.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''request.setAttribute(&amp;quot;errorMsgs&amp;quot;, errorMsgs);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We set the variable '''errorMsgs '''into the '''request scope''' using '''setAttribute '''method'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''errorMsgs.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, '''errorMsgs '''is the '''attribute name.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''String id = null&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have initialized a '''String variable id '''to '''null.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''if(rs.next()){'''&lt;br /&gt;
&lt;br /&gt;
'''id&amp;lt;nowiki&amp;gt;= &amp;lt;/nowiki&amp;gt;rs.getString(1);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, we check if the '''user '''exists in the '''database.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If yes, we store the value in the variable '''id.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''else{'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;Invalid username or password&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''//return&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Else, we add the error '''Invalid username or password '''to '''errorMsgs list.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''if (!errorMsgs.isEmpty()) {'''&lt;br /&gt;
&lt;br /&gt;
'''RequestDispatcher view = request.getRequestDispatcher(&amp;quot;index.jsp&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''view.forward(request, response);'''&lt;br /&gt;
&lt;br /&gt;
'''return&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| If the '''errorMsgs list '''is not empty, we display the '''error messages '''on '''index '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, we have to redirect to '''index '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have already seen how to redirect to another page using '''RequestDispatcher.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''try catch block.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that we have included this code in the '''try catch block '''to handle '''exception '''scenarios.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, we will see how to fetch '''errorMsgs '''variable in '''index '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;%&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''if( request.getAttribute(&amp;quot;errorMsgs&amp;quot;) != null){'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| First, we obtain the value of the '''attribute errorMsgs.'''&lt;br /&gt;
&lt;br /&gt;
This is done using the '''getAttribute method '''on the '''request.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;% &amp;lt;/nowiki&amp;gt;'''and '''%&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that we have included the '''Java code '''within the opening tag ''less than sign percentage sign ''and the closing tag ''percentage sign and greater than sign.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;%&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''if( request.getAttribute(&amp;quot;errorMsgs&amp;quot;) != null){'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This block of code is known as '''scriptlet.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It contains '''Java code '''which is executed every time '''JSP '''is invoked.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;div&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;%=&amp;quot;&amp;lt;/nowiki&amp;gt;Please correct the following errors!!!!&amp;quot; %&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;div&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| If the value of '''errorMsgs '''is not null, we first display this message.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Please correct the following errors.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;% &amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''java.util.List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt; errorMsgs = (java.util.List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt;)request.getAttribute(&amp;quot;errorMsgs&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''for(String errorMsg: errorMsgs){'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We then iterate through the '''errorMsgs.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;li&amp;lt;nowiki&amp;gt;&amp;gt; &amp;lt;%= &amp;lt;/nowiki&amp;gt;errorMsg&amp;lt;nowiki&amp;gt;%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;li&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We then display the '''error messages '''as a '''list.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This is how we display the '''error messages '''on the '''index '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us see how to add a''' user''' into the '''database'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before adding a '''user '''into the '''database, '''we have to create a '''model '''for the '''User table.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see what a '''model '''is.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
&lt;br /&gt;
Model&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''model :'''&lt;br /&gt;
&lt;br /&gt;
* Represents the underlying, logical structure of '''data '''in a '''software application.'''&lt;br /&gt;
* A '''Java class '''with '''attributes '''and '''setters '''and '''getters '''for them.&lt;br /&gt;
* In this way, we can consider '''model '''as a whole instead of the individual '''attributes.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to '''Netbeans IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have already created the model '''User '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''package org.spokentutorial.model&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that we have created this '''Java class '''inside the '''package org ''dot ''spokentutorial ''dot ''model.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight&lt;br /&gt;
&lt;br /&gt;
'''private String firstName&amp;lt;nowiki&amp;gt;=&amp;quot; &amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''private String surname&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''private int age&amp;lt;nowiki&amp;gt;=0;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''private String gender&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''private String email&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''private String username&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''private String password&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;quot;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have the following '''attributes firstName, surname, age, gender, email, username, password.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have initialized them to empty values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''public User(String firstName, String surname, int age,String gender,String email,String username,String password){'''&lt;br /&gt;
&lt;br /&gt;
'''this.firstName&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;firstName&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''this.surname&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;surname&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''this.age&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;age&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''this.gender&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;gender&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''this.email&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;email&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''this.username&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;username&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''this.password&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;password&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have a '''parameterized constructor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''public User() {'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We also have the '''default constructor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''public String getFirstName() {'''&lt;br /&gt;
&lt;br /&gt;
'''return firstName&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We define the '''getFirstName method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''public void setFirstName(String firstName) {'''&lt;br /&gt;
&lt;br /&gt;
'''this.firstName = firstName&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We also define the '''setFirstName method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''public String getSurname() {'''&lt;br /&gt;
&lt;br /&gt;
'''return surname&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public void setSurname(String surname) {'''&lt;br /&gt;
&lt;br /&gt;
'''this.surname = surname&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public void setAge(int age) {'''&lt;br /&gt;
&lt;br /&gt;
'''this.age = age&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public int getAge() {'''&lt;br /&gt;
&lt;br /&gt;
'''return age&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public String getGender() {'''&lt;br /&gt;
&lt;br /&gt;
'''return gender&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public void setGender(String gender) {'''&lt;br /&gt;
&lt;br /&gt;
'''this.gender = gender&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public String getEmail() {'''&lt;br /&gt;
&lt;br /&gt;
'''return email&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public void setEmail(String email) {'''&lt;br /&gt;
&lt;br /&gt;
'''this.email&amp;lt;nowiki&amp;gt;= &amp;lt;/nowiki&amp;gt;email&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public String getUsername() {'''&lt;br /&gt;
&lt;br /&gt;
'''return username&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public void setUsername(String username) {'''&lt;br /&gt;
&lt;br /&gt;
'''this.username = username&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public String getPassword() {'''&lt;br /&gt;
&lt;br /&gt;
'''return password ;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''public void setPassword(String password) {'''&lt;br /&gt;
&lt;br /&gt;
'''this.password&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;password&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Similary we define the '''set '''and '''get methods '''on each of the '''attributes.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come back to the '''browser'''.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come back to the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''here '''to '''register.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us click on '''here link '''to '''register.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type all the fields in the '''Registration Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add User.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Add User.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We get a '''Add User Success Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us see how this is done.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''AddUserServlet '''''dot '''''java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''AddUserServlet '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The steps are similar to that we had followed in '''GreetingServlet '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''String firstName&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(&amp;quot;firstname&amp;quot;).trim();'''&lt;br /&gt;
&lt;br /&gt;
'''String surname&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(&amp;quot;surname&amp;quot;).trim();'''&lt;br /&gt;
&lt;br /&gt;
'''String age&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(&amp;quot;age&amp;quot;).trim();'''&lt;br /&gt;
&lt;br /&gt;
'''String gender&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(&amp;quot;gender&amp;quot;).trim();'''&lt;br /&gt;
&lt;br /&gt;
'''String email&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(&amp;quot;email&amp;quot;).trim();'''&lt;br /&gt;
&lt;br /&gt;
'''String userName&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(&amp;quot;username&amp;quot;).trim();'''&lt;br /&gt;
&lt;br /&gt;
'''String password&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(&amp;quot;password&amp;quot;).trim();'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We get the '''form parameters '''using the '''getParameter method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''User user =new User(firstName,surname,ageUser,gender,email,userName,password);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We initialize variable '''user '''as '''instance '''of '''User Model '''with individual '''attributes.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''request.setAttribute(&amp;quot;user&amp;quot;, user);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We set the variable '''user '''into the '''request scope '''using '''setAttribute method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we insert the values into the '''User table.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''RequestDispatcher view = request.getRequestDispatcher(&amp;quot;successUser.jsp&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''view.forward(request, response);'''&lt;br /&gt;
&lt;br /&gt;
'''return&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| If there are no errors while filling up the '''form, '''we forward to the '''successUser page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Go to '''successUser '''''dot '''''jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come to '''successUser '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;%@&amp;lt;/nowiki&amp;gt;page import&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;org.spokentutorial.model.User&amp;quot;%&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| First, we have imported '''User '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This line of code is called '''directive '''in '''JSP.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;%@ &amp;lt;/nowiki&amp;gt;'''and '''%&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''JSP directive '''starts with ''opening tag less than sign percentage sign and at the rate sign ''and ends with ''percentage sign and greater than sign.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;%@&amp;lt;/nowiki&amp;gt;page import&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;org.spokentutorial.model.User&amp;quot;%&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This one is a '''page directive.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''page directive '''contains a list of all imported '''packages.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;%&amp;lt;/nowiki&amp;gt;User user = (User)request.getAttribute(&amp;quot;user&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We get the value of the attribute '''user '''and store it as the '''User object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''Your request to add &amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;i&amp;lt;nowiki&amp;gt;&amp;gt; &amp;lt;%=&amp;lt;/nowiki&amp;gt;user.getUsername&amp;lt;nowiki&amp;gt;() %&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;i&amp;gt; was successful.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have the '''success message '''here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;user.getUsername() %&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, we have retrieved the '''Username.'''&lt;br /&gt;
&lt;br /&gt;
We have''' '''used the '''getUsername() method '''on the '''request object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have done this using '''scriptlet tags.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come back to the browser.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will try to add a '''user '''already present in the database.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the fields for '''nisha '''again.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I will add '''nisha '''again.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''Duplicate entry for key username.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that we get the '''error message Duplicate entry for key username.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us register for a user once again.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Show the registration form filled up.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, I have filled up the form now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''Age textbox.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have created a mistake in the '''Age''' field.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have typed '''ab '''instead of a valid number.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add User.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, click on '''Add User.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the error message.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see we get the error message '''The age must be a positive integer.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us see how this is done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switch back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''AddUserServlet '''''dot '''''java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''AddUserServlet '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt; errorMsgs&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;new ArrayList&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt;();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here also, we have created a '''list for errorMsgs.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''request.setAttribute(&amp;quot;errorMsgs&amp;quot;, errorMsgs);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we set the variable '''errorMsgs '''into the '''request scope '''using '''setAttribute method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''int ageUser&amp;lt;nowiki&amp;gt;=-1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, we have declared '''ageUser '''of type '''integer.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''try {'''&lt;br /&gt;
&lt;br /&gt;
'''ageUser&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;Integer.parseInt(age);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the '''try catch block '''we have used '''parseInt method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will return an integer, given a string representation of number as input.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''catch(NumberFormatException nfe) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;The age must be a positive integer&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So here we validate that the '''age field''' contains a valid positive integer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the validation fails, then we add error message to '''errorMsgs attribute.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''if(firstName.length()==0) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;Please enter the first name&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''if(surname.length()==0) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;Please enter the surname&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''if(age.length()==0) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;Please enter the age&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''if(userName.length()==0) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;Please enter the username&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''if(password.length()==0) {'''&lt;br /&gt;
&lt;br /&gt;
'''errorMsgs.add(&amp;quot;Please enter the password&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Similarly, we have to validate that all the other fields too have valid data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''if(!errorMsgs.isEmpty()) {'''&lt;br /&gt;
&lt;br /&gt;
'''RequestDispatcher view = request.getRequestDispatcher(&amp;quot;addUser.jsp&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''view.forward(request, response);'''&lt;br /&gt;
&lt;br /&gt;
'''return&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| If there are no errors, then we will display the '''errorMsgs '''on '''addUser '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
We have already seen how to do this using the '''RequestDispatcher.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come to the '''addUser '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;%@&amp;lt;/nowiki&amp;gt;page import&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;org.spokentutorial.model.User&amp;quot;%&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here also, we have imported '''User '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight'''&amp;lt;nowiki&amp;gt; &amp;lt;%&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''User user = new User();'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the '''scriptlet tags '''we have created an '''object '''of type '''User.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''if(request.getAttribute(&amp;quot;errorMsgs&amp;quot;) != null){'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we get the value of attribute '''errorMsgs '''using '''getAttribute method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''if(request.getAttribute(&amp;quot;errorMsgs&amp;quot;) != null){'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We check if this value is '''null.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''java.util.List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt; errorMsgs = (java.util.List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;String&amp;gt;)request.getAttribute(&amp;quot;errorMsgs&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''for(String errorMsg: errorMsgs){'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;li&amp;lt;nowiki&amp;gt;&amp;gt; &amp;lt;%= &amp;lt;/nowiki&amp;gt;errorMsg&amp;lt;nowiki&amp;gt;%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;li&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;%&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| If yes, we display the error message just as we had done for '''index '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''user = (User)request.getAttribute(&amp;quot;user&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| If not, we will get the value of the '''attribute user from request '''using the '''User model.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we have the '''form.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''form tag.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The '''form tag '''has '''action '''as '''AddUserServlet '''and '''method '''as '''POST.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''First Name&amp;lt;nowiki&amp;gt;:&amp;lt;&amp;lt;/nowiki&amp;gt;input type&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;text' name&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;firstname' value&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;%=&amp;lt;/nowiki&amp;gt;user.getFirstName()%&amp;gt;&amp;quot;&amp;gt; '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The first field is '''First Name '''of '''input type '''as''' text ''','''name '''as '''firstName '''and '''value '''as '''user '''''dot '''''getFirstName.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we are initializing the value of '''firstName '''to empty string.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the other fields.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Similarly you have to do for other fields.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the submit button.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We also have a '''button '''of type '''submit '''and '''name Add User.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the link to '''index '''''dot '''''jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We also have a link to '''index '''''dot '''''jsp '''which allows you to log out.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This is how we validate the fields in '''addUser.jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| You can try out different errors on the '''Add User page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Show in database&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that the user '''nisha '''has been added to the '''database.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt:&lt;br /&gt;
&lt;br /&gt;
* Database connectivity&lt;br /&gt;
* Field validation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Watch the video available at the following link.&lt;br /&gt;
&lt;br /&gt;
* It summarizes the Spoken Tutorial Project&lt;br /&gt;
* If you do not have good bandwidth you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
* For more details please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
Acknowledgement&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher Project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
* More information on this mission is available at&lt;br /&gt;
* http://spoken-tutorial.org/NMEICT-Intro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10&lt;br /&gt;
&lt;br /&gt;
Contributor Slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Library Management System has been contributed by a leading software MNC, through their Corporate Social Responsibility Programme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They have also validated the content for this spoken tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-java-Installation/English</id>
		<title>Java/C2/Getting-started-java-Installation/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-java-Installation/English"/>
				<updated>2013-09-11T11:12:42Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Getting started with Java: Installation&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: video tutorial,install'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;Visual Cue&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;Narration&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Welcome to the Spoken Tutorial on Getting started with Java: Installation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn&lt;br /&gt;
&lt;br /&gt;
* To install the JDK using Synaptic Package Manager.&lt;br /&gt;
* Why Java?&lt;br /&gt;
* Types and applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
System Requirements&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Here we are using &lt;br /&gt;
&lt;br /&gt;
* Ubuntu version 11.10 and &lt;br /&gt;
* Java Development Environment JDK 1.6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3a&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To follow this tutorial you must be connected to the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You must have Synaptic Package Manager installed on your system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You must also have knowledge of using '''Terminal''', '''Text Editor''' and '''Synaptic Package Manager''' in '''Linux'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, please see the Spoken Tutorial on Linux, available at spoken-tutorial.org.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To run a java program we need to install the '''JDK''', the '''Java Development Kit.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To learn more about''' JDK''' you could visit the following link:&lt;br /&gt;
&lt;br /&gt;
[http://docs.oracle.com/javase/6/docs/index.html http://docs.oracle.com/javase/6/docs/index.html]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now we will install the '''JDK''' using '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this, you need to have root permissions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You also need to know how to choose a repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are explained in the pre-requisite tutorial on Linux mentioned earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Switch to Desktop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''DashHome'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type''' Synaptic '''in the''' search box.'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, on the left corner of your '''Desktop''', you will find the '''Taskbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the top you will find '''DashHome'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''DashHome.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the search bar type '''Synaptic.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will find '''Synaptic Package Manager '''here'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Click '''on '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will be asked to type your password for '''Authentication'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type your '''password''' and '''click '''on '''Authenticate'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Type '''jdk '''in the quick search box.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| This opens the '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Now In the '''Quick Filter '''box type '''jdk'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We see a '''package''' named '''openjdk-6-jdk.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Right click '''on it and''' click '''on '''Mark for Installation'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on '''Apply'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Right click on '''openjdk-6-jdk'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Mark for Installation'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Apply'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
You will be asked to confirm the list of marked changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''click''' on '''To be Installed '''and then '''click '''on '''Apply'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installation will take a few seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we see that the option '''openjdk-6-jdk''' is in green colour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus our installation is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us verify the installation, For this open the terminal by presing ''Ctrl, Alt and T keys simultaneously &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I already opened have my '''Terminal''' opened here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the command prompt type '''java''' space hyphen '''version''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We see that the '''version number''' of the '''jdk''' has been displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Depending on the version that you used your '''version number''' could be different.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, we have successfully installed the '''jdk'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Open the code in''' TextEditor.'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, let us run a simple Java program and see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I already have the following code saved in the file name '''TestProgram dot java'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me compile and run this code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This code simply displays '''We have successfully run a Java Program''' on the '''Terminal'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So let us go back to the''' Terminal'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that I have saved the file '''TestProgram''' ''dot'' '''java''' in the '''Home''' '''directory'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| And currently I am in the '''Home Directory.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| At the command prompt type '''javac''' ''space''' ''TestProgram''' ''dot'' '''java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is to compile the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let me run the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type '''java''' space '''TestProgram ''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We get the output as '''We have successfully run a java program.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, our installation has been perfect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us go back to the slides.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| I will now explain why Java is useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Java is simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Java is object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is platform independent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. It is safe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Java has high performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Java is multi – threaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We will now go through some types and applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''JSP, or Java Server Pages: '''It is based on a code with normal HTML tags.&lt;br /&gt;
&lt;br /&gt;
JSP helps in creating dynamic web pages.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''Java Applets''': It is used to provide interactive features to web applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''J2EE or Java Enterprise Edition: '''Companies use J2EE.&lt;br /&gt;
&lt;br /&gt;
It is useful to transfer XML structured documents.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''JavaBeans''': JavaBeans is a reusable software component.&lt;br /&gt;
&lt;br /&gt;
It can be used to build new and advanced applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''Mobile Java''': It is used for various entertainment devices, such as mobile phone.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| So in this tutorial we learnt &lt;br /&gt;
&lt;br /&gt;
* To install the JDK using Synaptic Package Manager.&lt;br /&gt;
* To compile and run a Java program.&lt;br /&gt;
* Benefits of using Java.&lt;br /&gt;
* Types and Applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
About Slide&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 10&lt;br /&gt;
&lt;br /&gt;
About Slide &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test &lt;br /&gt;
&lt;br /&gt;
* For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 11&lt;br /&gt;
&lt;br /&gt;
Acknowledgment&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
* More information on this Mission is available at &lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 12&lt;br /&gt;
&lt;br /&gt;
Contributor Slide &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining us.&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish signing off.&lt;br /&gt;
&lt;br /&gt;
Good bye and Jai Hind.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-java-Installation/English</id>
		<title>Java/C2/Getting-started-java-Installation/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-java-Installation/English"/>
				<updated>2013-09-11T11:08:28Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Getting started with Java: Installation&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: video tutorial,install'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;Visual Cue&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;Narration&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Welcome to the Spoken Tutorial on Getting started with Java: Installation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn&lt;br /&gt;
&lt;br /&gt;
* To install the JDK using Synaptic Package Manager.&lt;br /&gt;
* Why Java?&lt;br /&gt;
* Types and applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
System Requirements&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Here we are using &lt;br /&gt;
&lt;br /&gt;
* Ubuntu version 11.10 and &lt;br /&gt;
* Java Development Environment JDK 1.6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3a&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To follow this tutorial you must be connected to the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You must have Synaptic Package Manager installed on your system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You must also have knowledge of using '''Terminal''', '''Text Editor''' and '''Synaptic Package Manager''' in '''Linux'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, please see the Spoken Tutorial on Linux, available at spoken-tutorial.org.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To run a java program we need to install the '''JDK''', the '''Java Development Kit.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To learn more about''' JDK''' you could visit the following link:&lt;br /&gt;
&lt;br /&gt;
[http://docs.oracle.com/javase/6/docs/index.html http://docs.oracle.com/javase/6/docs/index.html]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now we will install the '''JDK''' using '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this, you need to have root permissions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You also need to know how to choose a repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are explained in the pre-requisite tutorial on Linux mentioned earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Switch to Desktop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''DashHome'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type''' Synaptic '''in the''' search box.'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, on the left corner of your '''Desktop''', you will find the '''Taskbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the top you will find '''DashHome'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''DashHome.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the search bar type '''Synaptic.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will find '''Synaptic Package Manager '''here'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Click '''on '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will be asked to type your password for '''Authentication'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type your '''password''' and '''click '''on '''Authenticate'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Type '''jdk '''in the quick search box.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| This opens the '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Now In the '''Quick Filter '''box type '''jdk'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We see a '''package''' named '''openjdk-6-jdk.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Right click '''on it and''' click '''on '''Mark for Installation'''.&lt;br /&gt;
&lt;br /&gt;
Then click on '''Apply'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Right click on '''openjdk-6-jdk'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Mark for Installation'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Apply'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
You will be asked to confirm the list of marked changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''click''' on '''To be Installed '''and then '''click '''on '''Apply'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installation will take a few seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we see that the option '''openjdk-6-jdk''' is in green colour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus our installation is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us verify the installation, For this open the terminal by presing ''Ctrl, Alt and T keys simultaneously &lt;br /&gt;
&lt;br /&gt;
I already opened have my '''Terminal''' opened here.&lt;br /&gt;
&lt;br /&gt;
At the command prompt type '''java''' space hyphen '''version''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
We see that the '''version number''' of the '''jdk''' has been displayed.&lt;br /&gt;
&lt;br /&gt;
Depending on the version that you used your '''version number''' could be different.&lt;br /&gt;
&lt;br /&gt;
So, we have successfully installed the '''jdk'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Open the code in''' TextEditor.'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, let us run a simple Java program and see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I already have the following code saved in the file name '''TestProgram dot java'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me compile and run this code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This code simply displays '''We have successfully run a Java Program''' on the '''Terminal'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So let us go back to the''' Terminal'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that I have saved the file '''TestProgram''' ''dot'' '''java''' in the '''Home''' '''directory'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| And currently I am in the '''Home Directory.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| At the command prompt type '''javac''' ''space''' ''TestProgram''' ''dot'' '''java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is to compile the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let me run the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type '''java''' space '''TestProgram ''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We get the output as '''We have successfully run a java program.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, our installation has been perfect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us go back to the slides.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| I will now explain why Java is useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Java is simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Java is object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is platform independent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. It is safe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Java has high performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Java is multi – threaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We will now go through some types and applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''JSP, or Java Server Pages: '''It is based on a code with normal HTML tags.&lt;br /&gt;
&lt;br /&gt;
JSP helps in creating dynamic web pages.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''Java Applets''': It is used to provide interactive features to web applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''J2EE or Java Enterprise Edition: '''Companies use J2EE.&lt;br /&gt;
&lt;br /&gt;
It is useful to transfer XML structured documents.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''JavaBeans''': JavaBeans is a reusable software component.&lt;br /&gt;
&lt;br /&gt;
It can be used to build new and advanced applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''Mobile Java''': It is used for various entertainment devices, such as mobile phone.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| So in this tutorial we learnt &lt;br /&gt;
&lt;br /&gt;
* To install the JDK using Synaptic Package Manager.&lt;br /&gt;
* To compile and run a Java program.&lt;br /&gt;
* Benefits of using Java.&lt;br /&gt;
* Types and Applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
About Slide&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 10&lt;br /&gt;
&lt;br /&gt;
About Slide &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test &lt;br /&gt;
&lt;br /&gt;
* For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 11&lt;br /&gt;
&lt;br /&gt;
Acknowledgment&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
* More information on this Mission is available at &lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 12&lt;br /&gt;
&lt;br /&gt;
Contributor Slide &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining us.&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish signing off.&lt;br /&gt;
&lt;br /&gt;
Good bye and Jai Hind.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-java-Installation/English</id>
		<title>Java/C2/Getting-started-java-Installation/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-java-Installation/English"/>
				<updated>2013-09-11T10:56:53Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Getting started with Java: Installation&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: video tutorial,install'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;Visual Cue&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;Narration&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Welcome to the Spoken Tutorial on Getting started with Java: Installation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn&lt;br /&gt;
&lt;br /&gt;
* To install the JDK using Synaptic Package Manager.&lt;br /&gt;
* Why Java?&lt;br /&gt;
* Types and applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
System Requirements&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Here we are using &lt;br /&gt;
&lt;br /&gt;
* Ubuntu version 11.10 and &lt;br /&gt;
* Java Development Environment JDK 1.6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3a&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To follow this tutorial you must be connected to the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You must have Synaptic Package Manager installed on your system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You must also have knowledge of using '''Terminal''', '''Text Editor''' and '''Synaptic Package Manager''' in '''Linux'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, please see the Spoken Tutorial on Linux, available at spoken-tutorial.org.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To run a java program we need to install the '''JDK''', the '''Java Development Kit.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To learn more about''' JDK''' you could visit the following link:&lt;br /&gt;
&lt;br /&gt;
[http://docs.oracle.com/javase/6/docs/index.html http://docs.oracle.com/javase/6/docs/index.html]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now we will install the '''JDK''' using '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this, you need to have root permissions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You also need to know how to choose a repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are explained in the pre-requisite tutorial on Linux mentioned earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Switch to Desktop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''DashHome'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type''' Synaptic '''in the''' search box.'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, on the left corner of your '''Desktop''', you will find the '''Taskbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the top you will find '''DashHome'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''DashHome.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the search bar type '''Synaptic.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will find '''Synaptic Package Manager '''here'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Click '''on '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will be asked to type your password for '''Authentication'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type your '''password''' and '''click '''on '''Authenticate'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Type '''jdk '''in the quick search box.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| This opens the '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Now In the '''Quick Filter '''box type '''jdk'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We see a '''package''' named '''openjdk-6-jdk.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Right click '''on it and''' click '''on '''Mark for Installation'''.&lt;br /&gt;
&lt;br /&gt;
Then click on '''Apply'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Right click on '''openjdk-6-jdk'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Mark for Installation'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Apply'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
You will be asked to confirm the list of marked changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''click''' on '''To be Installed '''and then '''click '''on '''Apply'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installation will take a few seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we see that the option '''openjdk-6-jdk''' is in green colour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus our installation is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us verify the installation, For this open the terminal by presing ''Ctrl, Alt and T keys simultaneously  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Open the code in''' TextEditor.'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, let us run a simple Java program and see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I already have the following code saved in the file '''TestProgram dot java'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me compile and run this code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This code simply displays '''We have successfully run a Java Program''' on the '''Terminal'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So let us come back to the''' Terminal'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that I have saved the file '''TestProgram''' ''dot'' '''java''' in the '''Home''' '''directory'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| And currently I am in the '''Home Directory.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| At the command prompt type '''javac''' ''space''' ''TestProgram''' ''dot'' '''java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is to compile the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let me run the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type '''java TestProgram '''and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We get the output as '''We have successfully run a java program.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, our installation has been perfect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us go back to the slides.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| I will now explain why Java is useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Java is simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Java is object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is platform independent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. It is safe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Java has high performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Java is multi – threaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We will now go through some types and applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''JSP, or Java Server Pages: '''It is based on a code with normal HTML tags.&lt;br /&gt;
&lt;br /&gt;
JSP helps in creating dynamic web pages.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''Java Applets''': It is used to provide interactive features to web applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''J2EE or Java Enterprise Edition: '''Companies use J2EE.&lt;br /&gt;
&lt;br /&gt;
It is useful to transfer XML structured documents.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''JavaBeans''': JavaBeans is a reusable software component.&lt;br /&gt;
&lt;br /&gt;
It can be used to build new and advanced applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''Mobile Java''': It is used for various entertainment devices, such as mobile phone.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| So in this tutorial we learnt how&lt;br /&gt;
&lt;br /&gt;
* To install the JDK using Synaptic Package Manager.&lt;br /&gt;
* To compile and run a Java program.&lt;br /&gt;
* Benefits of using Java.&lt;br /&gt;
* Types and Applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
About Slide&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 10&lt;br /&gt;
&lt;br /&gt;
About Slide &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test &lt;br /&gt;
&lt;br /&gt;
* For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 11&lt;br /&gt;
&lt;br /&gt;
Acknowledgment&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
* More information on this Mission is available at &lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 12&lt;br /&gt;
&lt;br /&gt;
Contributor Slide &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining us.&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish signing off.&lt;br /&gt;
&lt;br /&gt;
Good bye and Jai Hind.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-java-Installation/English</id>
		<title>Java/C2/Getting-started-java-Installation/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Getting-started-java-Installation/English"/>
				<updated>2013-09-11T10:50:27Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Getting started with Java: Installation&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: video tutorial,install'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;Visual Cue&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;Narration&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Welcome to the Spoken Tutorial on Getting started with Java: Installation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn&lt;br /&gt;
&lt;br /&gt;
* To install the JDK using Synaptic Package Manager.&lt;br /&gt;
* Why Java?&lt;br /&gt;
* Types and applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
System Requirements&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Here we are using &lt;br /&gt;
&lt;br /&gt;
* Ubuntu version 11.10 and &lt;br /&gt;
* Java Development Environment JDK 1.6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3a&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To follow this tutorial you must be connected to the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You must have Synaptic Package Manager installed on your system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You must also have knowledge of using '''Terminal''', '''Text Editor''' and '''Synaptic Package Manager''' in '''Linux'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, please see the Spoken Tutorial on Linux, available at spoken-tutorial.org.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To run a java program we need to install the '''JDK''', the '''Java Development Kit.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To learn more about''' JDK''' you could visit the following link:&lt;br /&gt;
&lt;br /&gt;
[http://docs.oracle.com/javase/6/docs/index.html http://docs.oracle.com/javase/6/docs/index.html]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now we will install the '''JDK''' using '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this, you need to have root permissions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You also need to know how to choose a repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are explained in the pre-requisite tutorial on Linux mentioned earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Switch to Desktop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''DashHome'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type''' Synaptic '''in the''' search box.'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, on the left corner of your '''Desktop''', you will find the '''Taskbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the top you will find '''DashHome'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''DashHome.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the search bar type '''Synaptic.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will find '''Synaptic Package Manager '''here'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Click '''on '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will be asked to type your password for '''Authentication'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type your '''password''' and '''click '''on '''Authenticate'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Type '''jdk '''in the quick search box.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| This opens the '''Synaptic Package Manager.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Now In the '''Quick Filter '''box type '''jdk'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We see a '''package''' named '''openjdk-6-jdk.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Right click '''on it and''' click '''on '''Mark for Installation'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Right click on '''openjdk-6-jdk'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Mark for Installation'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Apply'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
You will be asked to confirm the list of marked changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''click''' on '''To be Installed '''and then '''click '''on '''Apply'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The installation will take a few seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we see that the option '''openjdk-6-jdk''' is in green colour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus our installation is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us verify the installation, For this open the terminal by presing ''Ctrl, Alt and T keys simultaneously  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Open the code in''' TextEditor.'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, let us run a simple Java program and see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I already have the following code saved in the file '''TestProgram dot java'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me compile and run this code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This code simply displays '''We have successfully run a Java Program''' on the '''Terminal'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So let us come back to the''' Terminal'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that I have saved the file '''TestProgram''' ''dot'' '''java''' in the '''Home''' '''directory'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| And currently I am in the '''Home Directory.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| At the command prompt type '''javac''' ''space''' ''TestProgram''' ''dot'' '''java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is to compile the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let me run the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type '''java TestProgram '''and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We get the output as '''We have successfully run a java program.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, our installation has been perfect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us go back to the slides.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| I will now explain why Java is useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Java is simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Java is object oriented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is platform independent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. It is safe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Java has high performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Java is multi – threaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We will now go through some types and applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''JSP, or Java Server Pages: '''It is based on a code with normal HTML tags.&lt;br /&gt;
&lt;br /&gt;
JSP helps in creating dynamic web pages.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''Java Applets''': It is used to provide interactive features to web applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''J2EE or Java Enterprise Edition: '''Companies use J2EE.&lt;br /&gt;
&lt;br /&gt;
It is useful to transfer XML structured documents.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''JavaBeans''': JavaBeans is a reusable software component.&lt;br /&gt;
&lt;br /&gt;
It can be used to build new and advanced applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-'''Mobile Java''': It is used for various entertainment devices, such as mobile phone.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| So in this tutorial we learnt how&lt;br /&gt;
&lt;br /&gt;
* To install the JDK using Synaptic Package Manager.&lt;br /&gt;
* To compile and run a Java program.&lt;br /&gt;
* Benefits of using Java.&lt;br /&gt;
* Types and Applications of Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
About Slide&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial] &lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project &lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 10&lt;br /&gt;
&lt;br /&gt;
About Slide &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team &lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials &lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test &lt;br /&gt;
&lt;br /&gt;
* For more details, please write to contact@spoken-tutorial.org &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 11&lt;br /&gt;
&lt;br /&gt;
Acknowledgment&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
* More information on this Mission is available at &lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 12&lt;br /&gt;
&lt;br /&gt;
Contributor Slide &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining us.&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish signing off.&lt;br /&gt;
&lt;br /&gt;
Good bye and Jai Hind.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Creating-and-viewing-inventories/English</id>
		<title>Java-Business-Application/C2/Creating-and-viewing-inventories/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Creating-and-viewing-inventories/English"/>
				<updated>2013-09-06T05:02:41Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: Created page with ''''Title of script''': Creating and viewing inventories  '''Author: arya '''  '''Keywords: video, tutorial,fetch book details, fetch borrowed book details'''    {| style=&amp;quot;border-…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Creating and viewing inventories&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: video, tutorial,fetch book details, fetch borrowed book details'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken-tutorial on''' Creating and viewing inventories.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn to:&lt;br /&gt;
&lt;br /&gt;
* Modify the login page to redirect to admin page&lt;br /&gt;
&lt;br /&gt;
* Fetch all the book details &lt;br /&gt;
* Fetch borrowed book details&lt;br /&gt;
* To display the books borrowed by logged in user&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
Software Requirements&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Here we are using&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Version 12.04&lt;br /&gt;
* Netbeans IDE 7.3&lt;br /&gt;
* JDK 1.7&lt;br /&gt;
* Firefox web-browser 21.0&lt;br /&gt;
&lt;br /&gt;
You can use any web-browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| To follow this tutorial you must have knowledge of&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Basics of '''Java Servlets '''and '''JSPs'''&lt;br /&gt;
* Database and validation of fields&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Switch to '''NetBeans IDE '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Now, let us switch to '''NetBeans IDE '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to the '''Books table.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have created the '''Books table.'''&lt;br /&gt;
&lt;br /&gt;
You can see the different fields in the table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have inserted '''10 books '''into this '''table.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''Checkout table.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have created '''Checkout''' table to store borrowed books.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have inserted 5 entries into Checkout table.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have also created a '''model '''for '''Book '''and '''Checkout.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''Book.java '''and '''Checkout.java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Book.java '''is a book model.&lt;br /&gt;
&lt;br /&gt;
And '''Checkout.java '''is a checkout model.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to the browser.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, come to the browser.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us login as the '''admin.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the username as '''admin '''and password as '''admin.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So I will type the username and password''' as admin. '''Then click on '''Sign In.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point your mouse on the '''Admin Section Page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that we come to the '''Admin Section Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to '''Netbeans IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will come back to this page. Now let us switch to '''Netbeans IDE. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will see we how we modified the '''GreetingServlet '''to redirect to '''Admin Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''GreetingServlet.java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us see the '''GreetingServlet.java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''if(username.equals(&amp;quot;admin&amp;quot;) &amp;amp;&amp;amp; password.equals(&amp;quot;admin&amp;quot;)) {'''&lt;br /&gt;
&lt;br /&gt;
'''RequestDispatcher view = request.getRequestDispatcher(&amp;quot;adminsection.jsp&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''view.forward(request, response);'''&lt;br /&gt;
&lt;br /&gt;
'''return&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''' '''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here we check if '''username''' and '''password '''equals '''admin.'''&lt;br /&gt;
&lt;br /&gt;
If yes,''' '''then we redirect to '''adminsection.jsp.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have already seen how to forward to another page using '''RequestDispatcher.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to '''browser.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have two options here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the radio button for '''List Books.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will click on the '''radio button '''for '''List Books.''' &lt;br /&gt;
&lt;br /&gt;
Then click on '''Submit button.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to the '''list '''of all the '''books.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, we can see that we have the '''list '''of all the '''Books.'''&lt;br /&gt;
&lt;br /&gt;
It has all the details like '''Book Id, BookName,Author Name, Publisher, ISBN, Total Copies and Available copies.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now I will show you how this is done..&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''adminsection.jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come to the '''adminsection '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;input type&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;radio&amp;quot; name&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;menuselection&amp;quot; value&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;listbooks&amp;quot;&amp;gt;List Books&amp;lt;nowiki&amp;gt; &amp;lt;&amp;lt;/nowiki&amp;gt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;input type&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;radio&amp;quot; name&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;menuselection&amp;quot; value&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;listborrowedbooks&amp;quot;&amp;gt;List Borrowed Books&amp;lt;nowiki&amp;gt; &amp;lt;&amp;lt;/nowiki&amp;gt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here we have two '''radio buttons.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;input type&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;radio&amp;quot; name&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;menuselection&amp;quot; value&amp;lt;nowiki&amp;gt;=&amp;quot;&amp;lt;/nowiki&amp;gt;listbooks&amp;quot;&amp;gt;List Books&amp;lt;nowiki&amp;gt; &amp;lt;&amp;lt;/nowiki&amp;gt;br&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The first one is to '''list '''all the '''books.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''form action&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;AdminSection.java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that in '''adminsection '''''dot '''''jsp '''we have the '''form action '''as equal to '''AdminSection'''''.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''AdminSection '''''dot '''''java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''AdminSection '''''dot '''''java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''if(menuSelection.equals(&amp;quot;listbooks&amp;quot;)){'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This checks the option that we click on.&lt;br /&gt;
&lt;br /&gt;
We clicked on List Books.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''rs = statement.executeQuery(&amp;quot;SELECT * FROM Books&amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So this part of code is executed.&lt;br /&gt;
&lt;br /&gt;
We execute query to fetch books from '''Books table.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight &lt;br /&gt;
&lt;br /&gt;
'''List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;Book&amp;gt; books = new ArrayList&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;Book&amp;gt;();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next we create '''ArrayList''' to store the details of books&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''while(rs.next()){'''&lt;br /&gt;
&lt;br /&gt;
'''Book book = new Book();'''&lt;br /&gt;
&lt;br /&gt;
'''book.setBookId(rs.getInt(&amp;quot;id&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setBookName(rs.getString(&amp;quot;bookName&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setAuthorName(rs.getString(&amp;quot;authorName&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setISBN(rs.getString(&amp;quot;ISBN&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setPublisher(rs.getString(&amp;quot;publisher&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setTotalCopies(rs.getInt(&amp;quot;totalcopies&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setAvailCopies(rs.getInt(&amp;quot;availablecopies&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''books.add(book);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we iterate through the '''result set'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''Book book = new Book();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We create '''Book''' object&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''book.setBookId(rs.getInt(&amp;quot;id&amp;quot;));'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We set '''BookId '''into the '''Book '''object&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''book.setBookName(rs.getString(&amp;quot;bookName&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setAuthorName(rs.getString(&amp;quot;authorName&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setISBN(rs.getString(&amp;quot;ISBN&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setPublisher(rs.getString(&amp;quot;publisher&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setTotalCopies(rs.getInt(&amp;quot;totalcopies&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''book.setAvailCopies(rs.getInt(&amp;quot;availablecopies&amp;quot;));'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Similarly we set other attributes of book into '''Book '''Object&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''books.add(book);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we add '''book '''object into the '''books '''list.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''req.setAttribute(&amp;quot;books&amp;quot;, books);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we set '''ArrayList books''' into the '''request.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''RequestDispatcher requestDispatcher = req.getRequestDispatcher(&amp;quot;listBooks.jsp&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''requestDispatcher.forward(req, resp);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We forward the '''request '''to '''listBooks.jsp '''using '''RequestDispatcher'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now we come to '''listBooks.jsp'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;p&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''This form allows you to view the list of books.'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;p&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this page '''admin '''can view list of books.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;%&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;Book&amp;gt; books = (ArrayList&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;Book&amp;gt;)request.getAttribute(&amp;quot;books&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, first we obtain '''books''' from '''request'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;table width&amp;lt;nowiki&amp;gt;='100%' &amp;lt;/nowiki&amp;gt;border&amp;lt;nowiki&amp;gt;='1'&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;thead align&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;center'&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;th&amp;gt;Book Id&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;th&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;th&amp;gt;Book Name&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;th&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;th&amp;gt;Author Name&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;th&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;th&amp;gt;ISBN&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;th&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;th&amp;gt;Publisher&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;th&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;th&amp;gt;Total Copies&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;th&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;th&amp;gt;Available Copies&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;th&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;thead&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This '''HTML table''' will display details of books. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;%&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(Book book:books){'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;tr align&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;center'&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;%=book.getBookId&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getBookName&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getAuthorName&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getISBN&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getPublisher&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getTotalCopies&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getAvailCopies&amp;lt;nowiki&amp;gt;() %&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;tr&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;%&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So we will iterate through the book list.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getBookId&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here we display '''BookId''' of book.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getBookName&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getAuthorName&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getISBN&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getPublisher&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getTotalCopies&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;book.getAvailCopies&amp;lt;nowiki&amp;gt;() %&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Similarly we display other attributes of book.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This is how we display the list of books.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''browser'''.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, switch back to the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| click on '''List of Borrowed Books.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, click on '''List of Borrowed Books.'''&lt;br /&gt;
&lt;br /&gt;
'''Click on Submit button.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to the '''list '''of the '''books '''issued.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see a '''list '''of all the '''Books '''issued.&lt;br /&gt;
&lt;br /&gt;
It has details like '''Transaction Id, Book Id '''and '''Username.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now,I will switch back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
And show you the code for same.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Go to '''AdminSection.java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Go to '''AdminSection.java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''if(menuSelection.equals(&amp;quot;listborrowedbooks&amp;quot;)){'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We had clicked on '''List Borrowed Books.'''&lt;br /&gt;
&lt;br /&gt;
So''' menuSelection '''is equal to '''List Borrowed books.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''rs = statement.executeQuery(&amp;quot;SELECT * FROM Checkout order by transaction_Id&amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The steps are similar to what we saw for '''List Books.'''&lt;br /&gt;
&lt;br /&gt;
We execute the query to fetch borrowed books details from '''Checkout table.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;CheckOut&amp;gt; checkOut = new ArrayList&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;CheckOut&amp;gt;();'''&lt;br /&gt;
&lt;br /&gt;
'''while(rs.next()){'''&lt;br /&gt;
&lt;br /&gt;
'''CheckOut checkOutInstance = new CheckOut();'''&lt;br /&gt;
&lt;br /&gt;
'''checkOutInstance.setBookId(rs.getInt(&amp;quot;book_Id&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''checkOutInstance.setTransactionId(rs.getInt(&amp;quot;transaction_Id&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''checkOutInstance.setUserName(rs.getString(&amp;quot;username&amp;quot;));'''&lt;br /&gt;
&lt;br /&gt;
'''checkOut.add(checkOutInstance);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''req.setAttribute(&amp;quot;checkout&amp;quot;, checkOut);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we iterate through borrowed books.&lt;br /&gt;
&lt;br /&gt;
And set it into '''request''' as '''checkout '''attribute.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now we come to '''listBooks.jsp'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''List&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;CheckOut&amp;gt; checkout = (ArrayList&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;CheckOut&amp;gt;)request.getAttribute(&amp;quot;checkout&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here we obtain '''checkout''' from '''request'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;%&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(CheckOut checkoutInstance:checkout){'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;tr align&amp;lt;nowiki&amp;gt;='&amp;lt;/nowiki&amp;gt;center'&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;checkoutInstance.getTransactionId&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;checkoutInstance.getBookId&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;td&amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;%=&amp;lt;/nowiki&amp;gt;checkoutInstance.getUserName&amp;lt;nowiki&amp;gt;()%&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;td&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;tr&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;%&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''%&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We iterate through the '''Checkout''' list.&lt;br /&gt;
&lt;br /&gt;
Here we display the attributes of '''Checkout.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This is how we display '''Borrowed Books.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the''' browser.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, switch back to the''' browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to the '''list.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the borrowed books page we also have one more '''list.'''&lt;br /&gt;
&lt;br /&gt;
The '''list '''of '''books '''issued where '''current date '''is more than the '''return date.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to '''IDE '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to '''IDE '''to see the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This is done in the same way as we did for '''Borrowed Books.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''rs = statement.executeQuery(&amp;quot;SELECT * FROM Checkout where return_date&amp;lt;nowiki&amp;gt; &amp;lt; &amp;lt;/nowiki&amp;gt;now() order by transaction_Id &amp;quot;);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The only difference is in the '''SQL query.'''&lt;br /&gt;
&lt;br /&gt;
In the query we give the condition, '''return_date&amp;lt;nowiki&amp;gt; &amp;lt; &amp;lt;/nowiki&amp;gt;now() order by transaction_Id.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now I will show you the interface for a normal user.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''browser.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come back to the '''login page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Come back to the '''login page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the username as '''mdhusein.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I will login as '''mdhusein.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the password as '''welcome.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the password as '''welcome.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Sign In.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Sign In.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''Success Greeting Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We get a '''Success Greeting Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''Transaction Id, User Name, Book Id '''and '''Return Date.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It has the '''books '''currently borrowed by the '''user.'''&lt;br /&gt;
&lt;br /&gt;
It has details like '''Transaction Id, User Name, Book Id '''and '''Return Date.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us come back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Go to '''GreetingServlet.java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now we go to '''GreetingServlet.java'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We display the books issued in same way as we did for admin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the difference will be that we have to display books for the logged in user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So I get the username from this line.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''stmt = con.prepareStatement(&amp;quot;select * from Checkout where username &amp;lt;nowiki&amp;gt;= ? &amp;lt;/nowiki&amp;gt;order by return_date&amp;quot;);'''&lt;br /&gt;
&lt;br /&gt;
'''stmt.setString(1, username);'''&lt;br /&gt;
&lt;br /&gt;
'''rs = stmt.executeQuery();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then we fetch the details of borrowed books.&lt;br /&gt;
&lt;br /&gt;
With the condition username is equal to the logged in user. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Show '''successGreeting dot jsp'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, we get the list of books issued for the corresponding user.&lt;br /&gt;
&lt;br /&gt;
Then in '''successGreeting ''dot ''jsp '''we will display the list. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is how your '''successGreeting dot jsp '''will look.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we have learnt to:&lt;br /&gt;
&lt;br /&gt;
* Modify the login page to redirect to admin page&lt;br /&gt;
&lt;br /&gt;
* Fetch all the book details &lt;br /&gt;
* Fetch borrowed book details&lt;br /&gt;
* To display the books borrowed by logged in user&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Watch the video available at the following link.&lt;br /&gt;
&lt;br /&gt;
* It summarizes the Spoken Tutorial Project&lt;br /&gt;
* If you do not have good bandwidth you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
* For more details please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11&lt;br /&gt;
&lt;br /&gt;
Acknowledgement&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher Project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
* More information on this mission is available at&lt;br /&gt;
* http://spoken-tutorial.org/NMEICT-Intro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 12&lt;br /&gt;
&lt;br /&gt;
Contributor Slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Library Management System has been contributed by a leading software MNC, through their Corporate Social Responsibility Programme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They have also validated the content for this spoken tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Servlet-Methods/English</id>
		<title>Java-Business-Application/C2/Servlet-Methods/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Servlet-Methods/English"/>
				<updated>2013-08-23T12:18:26Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: Created page with ''''Title of script''': Servlet Methods  '''Author: arya '''  '''Keywords: servlets, video tutorial, GET, POST'''    {| style=&amp;quot;border-spacing:0;&amp;quot; | style=&amp;quot;border:1pt solid #000000…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Servlet Methods&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: servlets, video tutorial, GET, POST'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken-tutorial on''' Servlet Methods.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn to&lt;br /&gt;
&lt;br /&gt;
* create a simple login form using '''JSP'''&lt;br /&gt;
* Pass parameters using '''doGet''' '''method'''&lt;br /&gt;
* Pass parameters using '''doPost method'''&lt;br /&gt;
* Difference between''' doGet '''and '''doPost''' methods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
Software Requirements&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Here we are using&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Version 12.04&lt;br /&gt;
* Netbeans IDE 7.3&lt;br /&gt;
* JDK 1.7&lt;br /&gt;
* Firefox web-browser 21.0&lt;br /&gt;
&lt;br /&gt;
You can use any web-browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| To follow this tutorial you must know &lt;br /&gt;
&lt;br /&gt;
* Core Java using '''Netbeans IDE''' &lt;br /&gt;
* '''HTML'''&lt;br /&gt;
* Basics of '''Java Servlets '''and '''JSPs'''&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will begin by creating our web application- the '''Library Management System.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, we will create the '''home page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''home page''' will contain a simple '''login form'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It will allow authenticated users to login to the '''Library Management System.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to '''Netbeans IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us switch to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to '''index.jsp '''page.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us go to the '''index '''''dot '''''jsp '''page, that we had already modified earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I have modified this page to create our '''home page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''title.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We keep the '''title '''as '''Home Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''table '''and '''border&amp;lt;nowiki&amp;gt;=1&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the body, we have a '''table, '''with '''border '''''equal to '''''1.'''&lt;br /&gt;
&lt;br /&gt;
You can have a look at the code here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''Welcome to Library Management System.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the '''table, '''we have included a '''heading, Welcome to Library Management System.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''This is the home page for Library Management System.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next, we have '''paragraph tag '''that includes, '''This is the home page for Library Management System.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the line containing hyperlink.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then, we have a '''hyperlink, '''which links to a page called '''visitorHomePage '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will create this page later.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''form.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next,we have a very simple''' login form.'''&lt;br /&gt;
&lt;br /&gt;
This form allows a '''registered user''' to '''login''' .&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before creating the '''form '''we will have to create a '''servlet '''named '''GreetingServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Pause the tutorial and create a new '''servlet '''as explained in the earlier tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that the '''servlet name '''is '''GreetingServlet.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''URL pattern '''should be '''GreetingServletPath.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This''' form''' has two input elements - '''Username and Password.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It also has a '''Submit button '''that says '''Sign In.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''paragraph tag.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next, we have a '''paragraph tag '''that includes a link to '''addUser.jsp.'''&lt;br /&gt;
&lt;br /&gt;
This is the''' registration page''' for those '''users''' who have not yet registered.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us go to our GreetingServlet.java. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''org.spokentutorial.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that '''GreetingServlet.java '''is created in the same package '''org.spokentutorial.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''request object.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This '''servlet '''will be able to access the '''form data '''from the '''request object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''MyServlet.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This '''servlet '''will act as a '''controller.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do you recall that we had come across '''controller '''earlier?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, we will see what the '''servlet '''does as a '''controller.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''form data''' will reside in the '''request object.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first task is to retrieve the '''form''' data parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is done using the '''getParameter method '''on the '''request object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to '''Netbeans IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, let us switch to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''PrintWriter out =response.getWriter();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type inside the''' doGet method,''' &lt;br /&gt;
&lt;br /&gt;
'''PrintWriter ''space ''out ''equal to ''response ''dot ''getWriter''.'''''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next, we will retrieve the '''form data '''parameters.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''String username&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(“userName”);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So on the next line type, &lt;br /&gt;
&lt;br /&gt;
'''String ''space ''username ''equal to ''request ''dot ''getParameter ''within brackets and double quotes ''userName ''semicolon''.'''&lt;br /&gt;
&lt;br /&gt;
Note that this '''userName '''is the name we have included in the '''form tag '''for '''User Name.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''String password&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;request.getParameter(“password”);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Similarly, we will retrieve the '''password''' also.&lt;br /&gt;
&lt;br /&gt;
So on the next line, type, '''String '''''space '''''username '''''equal to '''''request ''dot ''getParameter ''within brackets and double quotes ''password ''semicolon''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next, we will print the '''User Name '''in the '''output'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''out.println(“Hello from GET Method” + username);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, on the next line type &lt;br /&gt;
&lt;br /&gt;
'''out ''dot ''println ''within brackets and double quotes ''Hello from GET Method plus username''.'''''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''MyFirstProject.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;Pause&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run this project, '''right-click''' on '''MyFirstProject. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Clean and Build.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Clean and Build.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''MyFirstProject '''and click on '''Run.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Again right click on '''MyFirstProject '''and click on '''Run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Hover your mouse over the console.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The '''server '''is up and running.&lt;br /&gt;
&lt;br /&gt;
It has deployed '''MyFirstProject.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Hover your mouse over the '''Home Page.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, we have got our '''home page '''displayed in the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point the mouse to the '''title.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Observe that the '''title '''of the page is '''Home Page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Hover your mouse over the login form.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see a very simple '''login form''' here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let me enter the '''Username '''and '''Password.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''spoken '''in the '''textbox.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| I will type '''arya '''as the '''Username.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''spoken&amp;lt;nowiki&amp;gt;*123 &amp;lt;/nowiki&amp;gt;'''as the '''Password.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| And '''arya&amp;lt;nowiki&amp;gt;*123 &amp;lt;/nowiki&amp;gt;'''as the '''Password.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Sign In.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Sign In.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Hover your mouse over the browser window.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that we have got the output '''Hello from GET Method''' '''arya'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, the '''user '''was able to login here because we have not included any validation inside the code. We will do this in the later tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the form data.&lt;br /&gt;
&lt;br /&gt;
Highlight the question mark.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, have a look at the '''URL '''here.&lt;br /&gt;
&lt;br /&gt;
It is '''localhost '''''colon '''''8080 '''''slash '''''MyFirstProject '''''slash '''''GreetingServletPath '''''question mark '''''userName '''''equal to '''''arya&amp;amp;password '''''equal to '''''arya&amp;lt;nowiki&amp;gt;*123.&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
The '''form data '''is separated from the page information by a ''question mark.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''userName&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;spoken&amp;amp;password&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;spoken&amp;lt;nowiki&amp;gt;*123&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see the '''username '''and '''password '''that we had entered in the '''form is '''inside the URL also.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us try '''to do''' the same using '''POST Method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Copy the code we had written for the '''doGet Method '''and paste it in the '''doPost Method.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Copy the code we had written for the '''doGet Method '''and paste in the '''doPost Method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''GET '''to '''POST.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, change the '''println''' statement to '''Hello from POST Method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Open '''index.jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us open '''index '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''GET '''to '''POST'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here, we must change the '''method attribute '''of the '''form tag '''to '''POST.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can have a look at this code now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have '''form action '''''equal to '''''GreetingServletPath method '''''equal to '''''POST.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''method&amp;lt;nowiki&amp;gt;=”&amp;lt;/nowiki&amp;gt;POST”.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, we will r'''un this Project again'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''MyFirstProject '''and click '''on Run'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have got an output similar to the one we got, when we used the '''GET method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So let us type the '''User Name '''and '''Password '''again.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Sign In.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that we have got '''Hello from POST Methodarya.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, take a look at the '''URL.'''&lt;br /&gt;
&lt;br /&gt;
'''localhost '''''colon '''''8080 '''''slash '''''MyFirstProject '''''slash '''''GreetingServletPath '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here we do not see the '''form data '''in the '''URL '''of the '''request.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This is the major difference between '''doGet '''and '''doPost Methods.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
'''When to use GET and POST Methods?'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us learn when to use '''GET '''and when to use '''POST Methods.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''GET Method '''is used when:&lt;br /&gt;
&lt;br /&gt;
* the '''form '''is small and hence the '''data '''is less.&lt;br /&gt;
* the '''user''' wants the contents of the data to be visible in the '''URL.'''&lt;br /&gt;
&lt;br /&gt;
'''POST Method '''is used when:&lt;br /&gt;
&lt;br /&gt;
* the '''form '''is large and hence the '''data '''is more.&lt;br /&gt;
* the '''user''' does not want the contents of the data to be visible in the '''URL.'''&lt;br /&gt;
&lt;br /&gt;
ex: '''passwords'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;Pause&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt to:&lt;br /&gt;
&lt;br /&gt;
* create a simple login form using '''JSP'''&lt;br /&gt;
* Pass parameters using '''doGet''' '''method'''&lt;br /&gt;
* Pass parameters using '''doPost method'''&lt;br /&gt;
* Difference between''' doGet '''and '''doPost''' methods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Please make sure that you have completed this tutorial before proceeding further.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Watch the video available at the following link.&lt;br /&gt;
&lt;br /&gt;
* It summarizes the Spoken Tutorial Project&lt;br /&gt;
* If you do not have good bandwidth you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11&lt;br /&gt;
&lt;br /&gt;
About slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
* For more details please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 12&lt;br /&gt;
&lt;br /&gt;
Acknowledgement&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher Project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
* More information on this mission is available at&lt;br /&gt;
* http://spoken-tutorial.org/NMEICT-Intro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 13&lt;br /&gt;
&lt;br /&gt;
Contributor Slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Library Management System has been contributed by a leading software MNC, through their Corporate Social Responsibility Programme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They have also validated the content for this spoken tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Java-servlets-and-JSPs/English</id>
		<title>Java-Business-Application/C2/Java-servlets-and-JSPs/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Java-servlets-and-JSPs/English"/>
				<updated>2013-08-23T06:33:50Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Java Servlets and JSP&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: web server,web container, servlets, jsp, video tutorial'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken-tutorial on''' Java Servlets and JSPs.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn about:&lt;br /&gt;
&lt;br /&gt;
* Web server&lt;br /&gt;
&lt;br /&gt;
* Web container&lt;br /&gt;
&lt;br /&gt;
We will also learn to create a simple Java Servlet and JSP.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
Software Requirements&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Here we are using&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Version 12.04&lt;br /&gt;
* Netbeans IDE 7.3&lt;br /&gt;
* JDK 1.7&lt;br /&gt;
* Firefox web-browser 21.0&lt;br /&gt;
&lt;br /&gt;
You can use any web-browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| To follow this tutorial you must have knowledge of&lt;br /&gt;
&lt;br /&gt;
* Core Java using '''Netbeans IDE''' and&lt;br /&gt;
&lt;br /&gt;
* '''HTML'''&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''Web Server'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Before moving onto '''Servlets '''and '''JSP, '''let us first understand a '''web server.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''Web Server'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| A '''web server '''is a system that delivers content to end-users over the''' Internet.'''&lt;br /&gt;
&lt;br /&gt;
'''It '''is also known as '''Internet server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Web Container'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| A '''web container''' is a component of a [http://en.wikipedia.org/wiki/Web_server web][http://en.wikipedia.org/wiki/Web_server  ][http://en.wikipedia.org/wiki/Web_server server] '''that interacts with [http://en.wikipedia.org/wiki/Java_(programming_language) Java] [http://en.wikipedia.org/wiki/Servlet servlets]. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also known as '''servlet container.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''servlet container '''allows the '''servlets '''to execute inside it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Switch to '''Netbeans.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Now, let us learn how to write a simple '''servlet.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switch to the '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We will now create a simple '''servlet''' and see. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Point to '''MyFirstProject '''in the '''Projects '''tab on the left hand side of the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on the '''Projects tab '''on the left hand side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Earlier we had created a simple '''Project '''named '''MyFirstProject.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can see it here on the left hand side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Let us now create a simple '''servlet''' inside this '''project'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Right click on '''MyFirstProject '''in the '''Projects '''tab.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| So, right-click on '''MyFirstProject'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''New-&amp;gt;Servlets.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''New '''and click on '''Servlets.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''New Servlet '''window opens.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''New Servlet '''window opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Class Name '''as '''MyServlet.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Class Name '''as '''MyServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Package Name '''as '''MyPackage.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Package Name '''as '''org.spokentutorial'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Next.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Next.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add information to deployment descriptor(web.xml).'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add information to deployment descriptor (web.xml).'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''Class Name.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that the '''Class Name '''is '''org.spokentutorial.MyServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''Servlet Name.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that '''Servlet Name '''is same as that of the '''Class Name '''which is '''MyServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''URL'''.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that the''' URL pattern '''has the same name as the '''Class Name.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change the '''URL''' name to '''MyServletPath. '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| You can change it to''' MyServletPath. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Finish.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Finish.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the''' servlet '''name and '''package''' name in the '''Projects''' tab.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The source code created by the IDE for '''MyServlet.java''' is seen in the '''Source Editor Window.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Move your mouse over the '''Source Editor Window.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see '''MyServlet.java is '''created in the '''package org.spokentutorial.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''MyServlet.java'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Notice '''that a '''servlet '''is just like any other '''Java class.'''&lt;br /&gt;
&lt;br /&gt;
Except that a '''servlet '''does not have a '''main method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Glassfish server'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us learn something about '''Glassfish server.'''&lt;br /&gt;
&lt;br /&gt;
A '''servlet''' is deployed in a '''servlet container.''' &lt;br /&gt;
&lt;br /&gt;
'''We are using Glassfish as our server.'''&lt;br /&gt;
&lt;br /&gt;
S'''ervlet container '''is a''' '''component of''' Glassfish''' that interacts with[http://en.wikipedia.org/wiki/Java_%28programming_language%29  ]servlets.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to '''Netbeans IDE'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''extends HttpServlet.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that MyS'''ervlet '''extends the '''HttpServlet. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''HttpServlet methods.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| At the bottom of the code, we can see '''HttpServlet methods.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the ''plus ''sign on the left to view '''HttpServlet methods.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the''' plus sign''''' ''on the left, to view these '''methods'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''doGet '''and '''doPost '''methods.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We '''see''' the methods -''' the doGet''', '''doPost''' and '''getServletInfo''' methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can override these methods.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''processRequest '''method.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that there is one more method named '''processRequest '''at the top.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Delete '''processRequest '''and '''getServletInfo''' &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will delete '''processRequest '''and''' getServletInfo''' methods to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So we are left with two methods '''doGet '''and '''doPost.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''doGet method'''.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For now, we will look at the '''doGet method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''doGet method.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''doGet '''is the default '''method''' for any simple '''URL '''request.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So we will type some code inside the '''doGet method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the method call from both '''doGet and doPost methods.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We had already deleted '''processRequest method.'''&lt;br /&gt;
&lt;br /&gt;
'''So,''' remove the method call for '''processRequest method.'''&lt;br /&gt;
&lt;br /&gt;
Also remove it from the '''doPost method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''doGet '''method&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come to the '''doGet method'''&lt;br /&gt;
&lt;br /&gt;
We can see that there are two '''parameters''' that are passed to the '''doGet method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight request and response parameters of the doGet method.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| One is the '''request '''and the other is the '''response object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight request object.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Also notice that, '''request '''is of '''type''' '''HttpServletRequest.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight response object.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| And '''response object '''is of '''type''' '''HttpServletResponse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will use the '''response object '''to send the '''HTML response '''back to the '''client''' side.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For that, we will have to create a '''PrintWriter object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''import '''statement.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Notice that the '''PrintWriter class '''is already imported'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type PrintWriter writer&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;response.getWriter();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, inside the '''doGet method '''type &lt;br /&gt;
&lt;br /&gt;
'''PrintWriter ''space ''writer ''equal to ''response ''dot ''getWriter ''open and close brackets semicolon'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| On the next line type -&lt;br /&gt;
&lt;br /&gt;
'''writer ''dot ''println ''within brackets and double quotes ''welcome.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Press Ctrl + S.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Press '''Ctrl ''plus''' '''''S t'''o save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us run the '''servlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''MyServlet.java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So on the left hand side, in the '''Projects tab '''right click on '''MyServlet''''' dot '''''java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Run File.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Run File.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|  &lt;br /&gt;
&lt;br /&gt;
Point to '''Set Servlet Execution URI dialog box.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
We get a '''Set Servlet Execution URI '''dialog box'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|    &lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| When the browser window opens, look at the URL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|    &lt;br /&gt;
&lt;br /&gt;
Highlight the '''URL'''&lt;br /&gt;
&lt;br /&gt;
Point to the '''Project name '''and '''servlet name.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It is''' localhost ''colon'' 8080 ''slash'' MyFirstProject slash MyServletPath.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|    &lt;br /&gt;
&lt;br /&gt;
Switch to '''Netbeans IDE'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here '''MyFirstProject '''is the '''context name '''and '''MyServletPath '''is the '''URL Pattern '''that we had set.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see the text '''welcome '''printed on the browser.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to '''netbeans IDE'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now go back to the '''netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''print''' method.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the '''println''' method we can pass '''html''' code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;h3&amp;gt;welcome&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;h3&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For example,&lt;br /&gt;
&lt;br /&gt;
put welcome in '''h3 tag.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Press CTRL + S'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Save''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Since we deployed this servlet earlier, we need not run it again. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The web container '''automatically detects it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to the browser.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, we can go back to the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Press F5.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Refresh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Show the message Welcome.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see the message '''Welcome''' in a different format.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, come back to the '''IDE'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Thus, we have successfully created a '''servlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can create any web application using '''servlets.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We used the servlet to display an '''HTML page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''println''' statements.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Notice that, we have '''HTML '''code inside the '''Java code.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Even though this is possible, it is difficult to do for large web applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And hence not a recommended practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It would be better to replace this using '''JSP (Java Server Pages.)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Servlets and JSPs'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We will see the use of '''servlets '''and '''jsps.'''&lt;br /&gt;
&lt;br /&gt;
* '''Servlets '''and '''JSPs '''are used together to separate presentation from content.&lt;br /&gt;
* '''Servlets '''act as the '''controller '''and '''JSPs '''act as the '''view '''i.e the front-end'''.'''&lt;br /&gt;
* '''Servlets '''contain '''HTML code '''within '''Java code.'''&lt;br /&gt;
* '''JSPs '''contain '''Java code '''within '''HTML code.'''&lt;br /&gt;
&lt;br /&gt;
We will learn more about these in the coming tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Switch back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Let us switch back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
We will now create a '''JSP page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Right Click on the '''MyFirstProject '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Right click on '''MyFirstProject'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Cick on '''New.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''New.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on JSP.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Then click on '''JSP. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| A new '''JSP window '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| File name type:''' welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Type the filename as welcome .&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click '''Finish'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| And click on '''Finish.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on the '''Projects tab '''on the left hand side.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on the '''Projects tab '''on the left hand side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Highlight '''Welcome.jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We can see that '''Welcome.jsp '''is under '''Web Pages '''folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Change '''Hello World''' to '''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| In the editor, change '''Hello World''' to '''Welcome'''.&lt;br /&gt;
&lt;br /&gt;
Notice that '''Welcome '''is within '''h1 tags.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Press '''CTRL + S'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Save''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to the '''browser'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
'''welcome.jsp'''&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
'''Press Enter'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| In the url after '''MyFirstProject''' '''''slash''''' type '''welcome.jsp'''&lt;br /&gt;
&lt;br /&gt;
And hit '''Enter'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Highlight the '''output'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We see the output '''Welcome.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Therefore for presentation purpose '''jsp '''is preferred. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Let us summarize&lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt&lt;br /&gt;
&lt;br /&gt;
* About web server and web container&lt;br /&gt;
* To create a simple servlet&lt;br /&gt;
* To create a simple jsp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Please make sure that you have completed this tutorial before proceeding further.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 9'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''About slide'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| * Watch the video available at the following link&lt;br /&gt;
* It summarizes the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 10'''&lt;br /&gt;
&lt;br /&gt;
'''About slide'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 11'''&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* http://spoken-tutorial.org/NMEICT- Intro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 12'''&lt;br /&gt;
&lt;br /&gt;
'''Contributor slide'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| The Library Management System has been contributed by a leading software MNC, through their Corporate Social&lt;br /&gt;
&lt;br /&gt;
Responsibility programme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They have also validated the content for this spoken tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Java-servlets-and-JSPs/English</id>
		<title>Java-Business-Application/C2/Java-servlets-and-JSPs/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Java-servlets-and-JSPs/English"/>
				<updated>2013-08-23T06:30:01Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Java Servlets and JSP&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: web server,web container, servlets, jsp, video tutorial'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken-tutorial on''' Java Servlets and JSPs.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn about:&lt;br /&gt;
&lt;br /&gt;
* Web server&lt;br /&gt;
&lt;br /&gt;
* Web container&lt;br /&gt;
&lt;br /&gt;
We will also learn to create a simple Java Servlet and JSP.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
Software Requirements&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Here we are using&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Version 12.04&lt;br /&gt;
* Netbeans IDE 7.3&lt;br /&gt;
* JDK 1.7&lt;br /&gt;
* Firefox web-browser 21.0&lt;br /&gt;
&lt;br /&gt;
You can use any web-browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| To follow this tutorial you must have knowledge of&lt;br /&gt;
&lt;br /&gt;
* Core Java using '''Netbeans IDE''' and&lt;br /&gt;
&lt;br /&gt;
* '''HTML'''&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''Web Server'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Before moving onto '''Servlets '''and '''JSP, '''let us first understand a '''web server.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''Web Server'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| A '''web server '''is a system that delivers content to end-users over the''' Internet.'''&lt;br /&gt;
&lt;br /&gt;
'''It '''is also known as '''Internet server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Web Container'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| A '''web container''' is a component of a [http://en.wikipedia.org/wiki/Web_server web][http://en.wikipedia.org/wiki/Web_server  ][http://en.wikipedia.org/wiki/Web_server server] '''that interacts with [http://en.wikipedia.org/wiki/Java_(programming_language) Java] [http://en.wikipedia.org/wiki/Servlet servlets]. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also known as '''servlet container.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''servlet container '''allows the '''servlets '''to execute inside it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Switch to '''Netbeans.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Now, let us learn how to write a simple '''servlet.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switch to the '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We will now create a simple '''servlet''' and see. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Point to '''MyFirstProject '''in the '''Projects '''tab on the left hand side of the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on the '''Projects tab '''on the left hand side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Earlier we had created a simple '''Project '''named '''MyFirstProject.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can see it here on the left hand side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Let us now create a simple '''servlet''' inside this '''project'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Right click on '''MyFirstProject '''in the '''Projects '''tab.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| So, right-click on '''MyFirstProject'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''New-&amp;gt;Servlets.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''New '''and click on '''Servlets.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''New Servlet '''window opens.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''New Servlet '''window opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Class Name '''as '''MyServlet.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Class Name '''as '''MyServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Package Name '''as '''MyPackage.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Package Name '''as '''org.spokentutorial'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Next.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Next.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add information to deployment descriptor(web.xml).'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add information to deployment descriptor (web.xml).'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''Class Name.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that the '''Class Name '''is '''org.spokentutorial.MyServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''Servlet Name.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that '''Servlet Name '''is same as that of the '''Class Name '''which is '''MyServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''URL'''.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that the''' URL pattern '''has the same name as the '''Class Name.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change the '''URL''' name to '''MyServletPath. '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| You can change it to''' MyServletPath. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Finish.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Finish.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the''' servlet '''name and '''package''' name in the '''Projects''' tab.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The source code created by the IDE for '''MyServlet.java''' is seen in the '''Source Editor Window.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Move your mouse over the '''Source Editor Window.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see '''MyServlet.java is '''created in the '''package org.spokentutorial.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''MyServlet.java'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Notice '''that a '''servlet '''is just like any other '''Java class.'''&lt;br /&gt;
&lt;br /&gt;
Except that a '''servlet '''does not have a '''main method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Glassfish server'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us learn something about '''Glassfish server.'''&lt;br /&gt;
&lt;br /&gt;
A '''servlet''' is deployed in a '''servlet container.''' &lt;br /&gt;
&lt;br /&gt;
'''We are using Glassfish as our server.'''&lt;br /&gt;
&lt;br /&gt;
S'''ervlet container '''is a''' '''component of''' Glassfish''' that interacts with[http://en.wikipedia.org/wiki/Java_%28programming_language%29  ]servlets.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to '''Netbeans IDE'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''extends HttpServlet.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that MyS'''ervlet '''extends the '''HttpServlet. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''HttpServlet methods.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| At the bottom of the code, we can see '''HttpServlet methods.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the ''plus ''sign on the left to view '''HttpServlet methods.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the''' plus sign''''' ''on the left, to view these '''methods'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''doGet '''and '''doPost '''methods.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We '''see''' the methods -''' the doGet''', '''doPost''' and '''getServletInfo''' methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can override these methods.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''processRequest '''method.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that there is one more method named '''processRequest '''at the top.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Delete '''processRequest '''and '''getServletInfo''' &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will delete '''processRequest '''and''' getServletInfo''' methods to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So we are left with two methods '''doGet '''and '''doPost.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''doGet method'''.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For now, we will look at the '''doGet method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''doGet method.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''doGet '''is the default '''method''' for any simple '''URL '''request.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So we will type some code inside the '''doGet method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the method call from both '''doGet and doPost methods.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We had already deleted '''processRequest method.'''&lt;br /&gt;
&lt;br /&gt;
'''So,''' remove the method call for '''processRequest method.'''&lt;br /&gt;
&lt;br /&gt;
Also remove it from the '''doPost method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''doGet '''method&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come to the '''doGet method'''&lt;br /&gt;
&lt;br /&gt;
We can see that there are two '''parameters''' that are passed to the '''doGet method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight request and response parameters of the doGet method.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| One is the '''request '''and the other is the '''response object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight request object.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Also notice that, '''request '''is of '''type''' '''HttpServletRequest.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight response object.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| And '''response object '''is of '''type''' '''HttpServletResponse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will use the '''response object '''to send the '''HTML response '''back to the '''client''' side.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For that, we will have to create a '''PrintWriter object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''import '''statement.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Notice that the '''PrintWriter class '''is already imported'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type PrintWriter writer&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;response.getWriter();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, inside the '''doGet method '''type &lt;br /&gt;
&lt;br /&gt;
'''PrintWriter ''space ''writer ''equal to ''response ''dot ''getWriter ''open and close brackets semicolon'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| On the next line type -&lt;br /&gt;
&lt;br /&gt;
'''writer ''dot ''println ''within brackets and double quotes ''welcome.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Press Ctrl + S.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Press '''Ctrl ''plus''' '''''S t'''o save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us run the '''servlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''MyServlet.java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So on the left hand side, in the '''Projects tab '''right click on '''MyServlet''''' dot '''''java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Run File.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Run File.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|  &lt;br /&gt;
&lt;br /&gt;
Point to '''Set Servlet Execution URI dialog box.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
We get a '''Set Servlet Execution URI '''dialog box'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|    &lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| When the browser window opens, look at the URL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|    &lt;br /&gt;
&lt;br /&gt;
Highlight the '''URL'''&lt;br /&gt;
&lt;br /&gt;
Point to the '''Project name '''and '''servlet name.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It is''' localhost ''colon'' 8080 ''slash'' MyFirstProject slash MyServletPath.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|    &lt;br /&gt;
&lt;br /&gt;
Switch to '''Netbeans IDE'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here '''MyFirstProject '''is the '''context name '''and '''MyServletPath '''is the '''URL Pattern '''that we had set.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see the text '''welcome '''printed on the browser.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to '''netbeans IDE'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now go back to the '''netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''print''' method.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the '''println''' method we can pass '''html''' code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;h3&amp;gt;welcome&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;h3&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For example,&lt;br /&gt;
&lt;br /&gt;
put welcome in '''h3 tag.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Press CTRL + S'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Save''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Since we deployed this servlet earlier, we need not run it again. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The web container '''automatically detects it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to the browser.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, we can go back to the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Press F5.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Refresh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Show the message Welcome.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see the message '''Welcome''' in a different format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Thus, we have successfully created a '''servlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can create any web application using '''servlets.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We used the servlet to display an '''HTML page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''println''' statements.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Notice that, we have '''HTML '''code inside the '''Java code.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Even though this is possible, it is difficult to do for large web applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And hence not a recommended practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It would be better to replace this using '''JSP (Java Server Pages.)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Servlets and JSPs'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We will see the use of '''servlets '''and '''jsps.'''&lt;br /&gt;
&lt;br /&gt;
* '''Servlets '''and '''JSPs '''are used together to separate presentation from content.&lt;br /&gt;
* '''Servlets '''act as the '''controller '''and '''JSPs '''act as the '''view '''i.e the front-end'''.'''&lt;br /&gt;
* '''Servlets '''contain '''HTML code '''within '''Java code.'''&lt;br /&gt;
* '''JSPs '''contain '''Java code '''within '''HTML code.'''&lt;br /&gt;
&lt;br /&gt;
We will learn more about these in the coming tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Switch back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Let us switch back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
We will now create a '''JSP page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Right Click on the '''MyFirstProject '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Right click on '''MyFirstProject'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Cick on '''New.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''New.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on JSP.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Then click on '''JSP. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| A new '''JSP window '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| File name type:''' welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Type the filename as welcome .&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click '''Finish'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| And click on '''Finish.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on the '''Projects tab '''on the left hand side.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on the '''Projects tab '''on the left hand side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Highlight '''Welcome.jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We can see that '''Welcome.jsp '''is under '''Web Pages '''folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Change '''Hello World''' to '''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| In the editor, change '''Hello World''' to '''Welcome'''.&lt;br /&gt;
&lt;br /&gt;
Notice that '''Welcome '''is within '''h1 tags.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Press '''CTRL + S'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Save''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to the '''browser'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
'''welcome.jsp'''&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
'''Press Enter'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| In the url after '''MyFirstProject''' '''''slash''''' type '''welcome.jsp'''&lt;br /&gt;
&lt;br /&gt;
And hit '''Enter'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Highlight the '''output'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We see the output '''Welcome.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Therefore for presentation purpose '''jsp '''is preferred. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Let us summarize&lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt&lt;br /&gt;
&lt;br /&gt;
* About web server and web container&lt;br /&gt;
* To create a simple servlet&lt;br /&gt;
* To create a simple jsp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Please make sure that you have completed this tutorial before proceeding further.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 9'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''About slide'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| * Watch the video available at the following link&lt;br /&gt;
* It summarizes the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 10'''&lt;br /&gt;
&lt;br /&gt;
'''About slide'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 11'''&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* http://spoken-tutorial.org/NMEICT- Intro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 12'''&lt;br /&gt;
&lt;br /&gt;
'''Contributor slide'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| The Library Management System has been contributed by a leading software MNC, through their Corporate Social&lt;br /&gt;
&lt;br /&gt;
Responsibility programme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They have also validated the content for this spoken tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Java-servlets-and-JSPs/English</id>
		<title>Java-Business-Application/C2/Java-servlets-and-JSPs/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Java-servlets-and-JSPs/English"/>
				<updated>2013-08-22T11:09:17Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: Created page with ''''Title of script''': Java Servlets and JSP  '''Akjuthor: arya '''  '''Keywords: web server,web container, servlets, jsp, video tutorial'''    {| style=&amp;quot;border-spacing:0;&amp;quot; | sty…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Java Servlets and JSP&lt;br /&gt;
&lt;br /&gt;
'''Akjuthor: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: web server,web container, servlets, jsp, video tutorial'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken-tutorial on''' Java Servlets and JSPs.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn about:&lt;br /&gt;
&lt;br /&gt;
* Web server&lt;br /&gt;
&lt;br /&gt;
* Web container&lt;br /&gt;
&lt;br /&gt;
We will also learn to create a simple Java Servlet and JSP.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
Software Requirements&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Here we are using&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Version 12.04&lt;br /&gt;
* Netbeans IDE 7.3&lt;br /&gt;
* JDK 1.7&lt;br /&gt;
* Firefox web-browser 21.0&lt;br /&gt;
&lt;br /&gt;
You can use any web-browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| To follow this tutorial you must have knowledge of&lt;br /&gt;
&lt;br /&gt;
* Core Java using '''Netbeans IDE''' and&lt;br /&gt;
&lt;br /&gt;
* '''HTML'''&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''Web Server'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Before moving onto '''Servlets '''and '''JSP, '''let us first understand a '''web server.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''Web Server'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| A '''web server '''is a system that delivers content to end-users over the''' Internet.'''&lt;br /&gt;
&lt;br /&gt;
'''It '''is also known as '''Internet server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Web Container'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| A '''web container''' is a component of a [http://en.wikipedia.org/wiki/Web_server web][http://en.wikipedia.org/wiki/Web_server  ][http://en.wikipedia.org/wiki/Web_server server] '''that interacts with [http://en.wikipedia.org/wiki/Java_(programming_language) Java] [http://en.wikipedia.org/wiki/Servlet servlets]. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also known as '''servlet container.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''servlet container '''allows the '''servlets '''to execute inside it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Switch to '''Netbeans.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Now, let us learn how to write a simple '''servlet.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switch to the '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We will now create a simple '''servlet''' and see. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Point to '''MyFirstProject '''in the '''Projects '''tab on the left hand side of the '''IDE.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on the '''Projects tab '''on the left hand side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Earlier we had created a simple '''Project '''named '''MyFirstProject.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can see it here on the left hand side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Let us now create a simple '''servlet''' inside this '''project'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Right click on '''MyFirstProject '''in the '''Projects '''tab.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| So, right-click on '''MyFirstProject'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''New-&amp;gt;Servlets.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''New '''and click on '''Servlets.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''New Servlet '''window opens.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''New Servlet '''window opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Class Name '''as '''MyServlet.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Class Name '''as '''MyServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Package Name '''as '''MyPackage.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type the '''Package Name '''as '''org.spokentutorial'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Next.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Next.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add information to deployment descriptor(web.xml).'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Add information to deployment descriptor (web.xml).'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''Class Name.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that the '''Class Name '''is '''org.spokentutorial.MyServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''Servlet Name.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that '''Servlet Name '''is same as that of the '''Class Name '''which is '''MyServlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''URL'''.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that the''' URL pattern '''has the same name as the '''Class Name.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change the '''URL''' name to '''MyServletPath. '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| You can change it to''' MyServletPath. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Finish.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Finish.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the''' servlet '''name and '''package''' name in the '''Projects''' tab.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The source code created by the IDE for '''MyServlet.java''' is seen in the '''Source Editor Window.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Move your mouse over the '''Source Editor Window.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see '''MyServlet.java is '''created in the '''package org.spokentutorial.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''MyServlet.java'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Notice '''that a '''servlet '''is just like any other '''Java class.'''&lt;br /&gt;
&lt;br /&gt;
Except that a '''servlet '''does not have a '''main method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Glassfish server'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us learn something about '''Glassfish server.'''&lt;br /&gt;
&lt;br /&gt;
A '''servlet''' is deployed in a '''servlet container.''' &lt;br /&gt;
&lt;br /&gt;
'''We are using Glassfish as our server.'''&lt;br /&gt;
&lt;br /&gt;
S'''ervlet container '''is a''' '''component of''' Glassfish''' that interacts with[http://en.wikipedia.org/wiki/Java_%28programming_language%29  ]servlets.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch back to '''Netbeans IDE'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''extends HttpServlet.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Note that MyS'''ervlet '''extends the '''HttpServlet. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''HttpServlet methods.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| At the bottom of the code, we can see '''HttpServlet methods.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the ''plus ''sign on the left to view '''HttpServlet methods.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on the''' plus sign''''' ''on the left, to view these '''methods'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''doGet '''and '''doPost '''methods.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We '''see''' the methods -''' the doGet''', '''doPost''' and '''getServletInfo''' methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can override these methods.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''processRequest '''method.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that there is one more method named '''processRequest '''at the top.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Delete '''processRequest '''and '''getServletInfo''' &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will delete '''processRequest '''and''' getServletInfo''' methods to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So we are left with two methods '''doGet '''and '''doPost.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''doGet method'''.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For now, we will look at the '''doGet method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''doGet method.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''doGet '''is the default '''method''' for any simple '''URL '''request.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So we will type some code inside the '''doGet method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the method call from both '''doGet and doPost methods.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We had already deleted '''processRequest method.'''&lt;br /&gt;
&lt;br /&gt;
'''So,''' remove the method call for '''processRequest method.'''&lt;br /&gt;
&lt;br /&gt;
Also remove it from the '''doPost method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''doGet '''method&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us come to the '''doGet method'''&lt;br /&gt;
&lt;br /&gt;
We can see that there are two '''parameters''' that are passed to the '''doGet method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight request and response parameters of the doGet method.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| One is the '''request '''and the other is the '''response object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight request object.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Also notice that, '''request '''is of '''type''' '''HttpServletRequest.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight response object.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| And '''response object '''is of '''type''' '''HttpServletResponse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We will use the '''response object '''to send the '''HTML response '''back to the '''client''' side.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For that, we will have to create a '''PrintWriter object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''import '''statement.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Notice that the '''PrintWriter class '''is already imported'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type PrintWriter writer&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;response.getWriter();'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, inside the '''doGet method '''type &lt;br /&gt;
&lt;br /&gt;
'''PrintWriter ''space ''writer ''equal to ''response ''dot ''getWriter ''open and close brackets semicolon'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| On the next line type -&lt;br /&gt;
&lt;br /&gt;
'''writer ''dot ''println ''within brackets and double quotes ''welcome.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Press Ctrl + S.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Press '''Ctrl ''plus''' '''''S t'''o save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, let us run the '''servlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Right click on '''MyServlet.java.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So on the left hand side, in the '''Projects tab '''right click on '''MyServlet''''' dot '''''java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Run File.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Click on '''Run File.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|  &lt;br /&gt;
&lt;br /&gt;
Point to '''Set Servlet Execution URI dialog box.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
We get a '''Set Servlet Execution URI '''dialog box'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|    &lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| When the browser window opens, look at the URL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|    &lt;br /&gt;
&lt;br /&gt;
Highlight the '''URL'''&lt;br /&gt;
&lt;br /&gt;
Point to the '''Project name '''and '''servlet name.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It is''' localhost ''colon'' 8080 ''slash'' MyFirstProject slash MyServletPath.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;|    &lt;br /&gt;
&lt;br /&gt;
Switch to '''Netbeans IDE'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here '''MyFirstProject '''is the '''context name '''and '''MyServletPath '''is the '''URL Pattern '''that we had set.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight '''welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see the text '''welcome '''printed on the browser.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to '''netbeans IDE'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now go back to the '''netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Point to '''print''' method.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the '''println''' method we can pass '''html''' code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;h3&amp;gt;welcome&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;h3&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For example,&lt;br /&gt;
&lt;br /&gt;
put welcome in '''h3 tag.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Press CTRL + S'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Save''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Since we deployed this servlet earlier, we need not run it again. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The web container '''automatically detects it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to the browser.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, we can go back to the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Thus, we have successfully created a '''servlet.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can create any web application using '''servlets.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We used the servlet to display an '''HTML page.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''println''' statements.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Notice that, we have '''HTML '''code inside the '''Java code.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Even though this is possible, it is difficult to do for large web applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And hence not a recommended practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| It would be better to replace this using '''JSP (Java Server Pages.)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Servlets and JSPs'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We will see the use of '''servlets '''and '''jsps.'''&lt;br /&gt;
&lt;br /&gt;
* '''Servlets '''and '''JSPs '''are used together to separate presentation from content.&lt;br /&gt;
* '''Servlets '''act as the '''controller '''and '''JSPs '''act as the '''view '''i.e the front-end'''.'''&lt;br /&gt;
* '''Servlets '''contain '''HTML code '''within '''Java code.'''&lt;br /&gt;
* '''JSPs '''contain '''Java code '''within '''HTML code.'''&lt;br /&gt;
&lt;br /&gt;
We will learn more about these in the coming tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Switch back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Let us switch back to '''Netbeans IDE.'''&lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
We will now create a '''JSP page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;|      &lt;br /&gt;
&lt;br /&gt;
Right Click on the '''MyFirstProject '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Right click on '''MyFirstProject'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Cick on '''New.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to '''New.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on JSP.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Then click on '''JSP. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| A new '''JSP window '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| File name type:''' welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Type the filename as welcome .&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click '''Finish'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| And click on '''Finish.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on the '''Projects tab '''on the left hand side.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Click on the '''Projects tab '''on the left hand side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Highlight '''Welcome.jsp.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We can see that '''Welcome.jsp '''is under '''Web Pages '''folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Change '''Hello World''' to '''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| In the editor, change '''Hello World''' to '''Welcome'''.&lt;br /&gt;
&lt;br /&gt;
Notice that '''Welcome '''is within '''h1 tags.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Press '''CTRL + S'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Save''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to the '''browser'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Go to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
'''welcome.jsp'''&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
'''Press Enter'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| In the url after '''MyFirstProject''' '''''slash''''' type '''welcome.jsp'''&lt;br /&gt;
&lt;br /&gt;
And hit '''Enter'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Highlight the '''output'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| We see the output '''Welcome.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Therefore for presentation purpose '''jsp '''is preferred. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Let us summarize&lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt&lt;br /&gt;
&lt;br /&gt;
* About web server and web container&lt;br /&gt;
* To create a simple servlet&lt;br /&gt;
* To create a simple jsp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Please make sure that you have completed this tutorial before proceeding further.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 9'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''About slide'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| * Watch the video available at the following link&lt;br /&gt;
* It summarizes the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 10'''&lt;br /&gt;
&lt;br /&gt;
'''About slide'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 11'''&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* http://spoken-tutorial.org/NMEICT- Intro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| '''Slide 12'''&lt;br /&gt;
&lt;br /&gt;
'''Contributor slide'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.106cm;&amp;quot;| The Library Management System has been contributed by a leading software MNC, through their Corporate Social&lt;br /&gt;
&lt;br /&gt;
Responsibility programme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They have also validated the content for this spoken tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Creating-a-Java-web-project/English</id>
		<title>Java-Business-Application/C2/Creating-a-Java-web-project/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java-Business-Application/C2/Creating-a-Java-web-project/English"/>
				<updated>2013-07-01T11:49:10Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: Created page with ''''Title of script''': Creating a Java Web Project  '''Author: arya '''  '''Keywords: deployment descriptor, web project, context, video tutorial'''    {| style=&amp;quot;border-spacing:0…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Creating a Java Web Project&lt;br /&gt;
&lt;br /&gt;
'''Author: arya '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: deployment descriptor, web project, context, video tutorial'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken-tutorial on''' Creating a Java Web Project.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| In this tutorial we will learn :&lt;br /&gt;
&lt;br /&gt;
* To create a '''Java''' Web Project&lt;br /&gt;
* About Deployment Descriptor&lt;br /&gt;
* About '''web.xml '''file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
Software Requirements&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| Here we are using&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Version 12.04&lt;br /&gt;
* Netbeans IDE 7.3&lt;br /&gt;
* JDK 1.7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| To follow this tutorial you must have knowledge of&lt;br /&gt;
&lt;br /&gt;
* '''Core Java''' using '''Netbeans IDE''' and&lt;br /&gt;
* '''HTML'''&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Switch to '''Netbeans IDE'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, let us see how to create a simple '''Java Web Project '''using''' Netbeans IDE'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this we will switch to''' Netbeans IDE'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''File''' -&amp;gt;''' New Project'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''File '''and then click on '''New Project.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| A '''New Project''' window opens.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| A '''New Project '''window opens up.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Select '''Java Web '''among categories and '''Web Application '''among '''Projects.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| From the categories, choose '''Java Web '''and from '''Projects '''choose '''Web Application.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Next.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Next.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| A '''New Web Application window '''opens.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| '''New Web Application''' '''window '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Type the '''Project Name '''as '''MyFirstProject.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We will type the '''Project Name '''as '''MyFirstProject.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The '''Project Location '''will remain as it is.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Let us keep the default '''Project Location''', which is '''NetbeansProjects.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The '''Project Folder''' will remain same as it is.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We will keep the '''Project Folder''' also as the default one.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The rest of the fields will be set their default values.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| All the remaining fields will be set at their default values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Next.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Next.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Select '''GlassFish server '''as the '''Web Server'''.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Select''' GlassFish server '''as the''' Web Server.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''Context Path.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Note that '''Context Path '''is '''MyFirstProject, '''which is the same name as our '''Project.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will learn about this in detail.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Next '''and then click on '''Finish.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Next '''and then click on '''Finish.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| In the '''Projects '''tab, a web application named '''MyFirstProject '''has been created. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on the arrow pointing towards '''MyFirstProject.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on the arrow pointing towards '''MyFirstProject.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Scroll through all the nodes.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We can see several nodes here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We are not concerned about all of these nodes right now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| First, we will learn about what is known as a '''Deployment Descriptor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| A '''web application'''’s '''deployment descriptor '''describes:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* the '''classes''', resources and configuration of the application and&lt;br /&gt;
* how the '''web server''' uses them to serve web requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| * The '''web server''' receives a request for the application.&lt;br /&gt;
&lt;br /&gt;
* It uses''' deployment descriptor '''to map the''' URL''' of the request. &lt;br /&gt;
&lt;br /&gt;
* It maps the''' URL '''to the code that has to handle the request.&lt;br /&gt;
&lt;br /&gt;
The '''deployment descriptor''' is a file named '''web.xml'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Scroll through the nodes.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We are not able to find the '''web.xml '''file from the nodes available here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Go to '''New''' -&amp;gt; '''File'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To locate it, at the top left of the '''IDE''', click on '''File''', and then on '''New File'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Web'''.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| From the '''Categories''', select '''Web.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Standard Deployment Descriptor(web.xml).'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| From the '''File Types, '''select '''Standard Deployment Descriptor(web.xml).'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Next.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Then click on '''Next.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Finish.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Finish.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on the '''Files''' tab on the left side of the''' IDE'''.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on the '''Files''' tab on the left side of the '''IDE.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Highlight '''Web Pages,''' '''WEB-INF '''and '''web.xml.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Note that '''web.xml '''is visible under the '''WEB-INF '''folder of the '''Web Pages''' node.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on the '''Source '''tab at the top.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on the '''Source '''tab at the top of the '''Editor''' window.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''web.xml''' file.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We can see the source code now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''web.xml''' header.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We have an '''xml''' header here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Highlight '''web-app.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We also have a '''web-app '''node.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, we shall try running the web-application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Right click on '''MyFirstProject.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To do so, right click on '''MyFirstProject.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Clean and Build.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Click on '''Clean and Build.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will delete any previously compiled files and other build outputs. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It will also recompile the application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Right click on''' MyFirstProject '''and click on '''Run.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Again, right click on '''MyFirstProject '''and then click on '''Run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Hover your mouse over the '''browser window''' and highlight '''HelloWorld!'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We see that a '''browser '''window opens up and displays the message '''Hello World!'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| This is because when we run the '''project''', the '''web application '''renders the page shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Highlight the '''URL.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, let’s have a look at the''' URL '''that rendered the page.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| It is '''localhost '''''colon'' '''8080''' ''slash'' '''MyFirstProject.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| '''Switch to Netbeans and show index.jsp.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| It is the '''index.jsp '''that was rendered.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Hover your mouse over the '''browser window.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| So when we run '''MyFirstProject '''by default we get a '''JSP '''page that says '''HelloWorld!'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Switch to '''Netbeans IDE.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Let us come back to our '''IDE'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Highlight index.jsp.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We can see that under the '''WEB-INF '''folder there is '''index '''''dot '''''jsp.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Double click on '''index.jsp'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Double click on '''index.jsp'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Hover your mouse over the source code.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We can see the source code here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is a simple '''JSP page''' with '''HTML tags '''only.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The server provides '''index.jsp '''by default when we run the web application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Recall that we had come across something called '''ContextPath''' earlier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We had set the '''ContextPath''' as '''MyFirstProject''' itself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Type '''localhost:8080'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now, in the''' URL '''type '''localhost''''' colon '''''8080.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Hover your mouse over the home page.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We see that the home page of '''Glassfish server '''is displayed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| This '''Glassfish server''' instance may have many applications running on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To access a particular application type that application name in the '''URL'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| So,we must type the specific application that has been deployed on that instance.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Type '''MyFirstProject '''in the '''URL.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| So we will type '''MyFirstProject '''here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Press '''Enter.'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Show the '''index.jsp '''page.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We can see that the '''index.jsp '''gets displayed on the browser.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;PAUSE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt &lt;br /&gt;
&lt;br /&gt;
* To create a simple '''Java Web''' '''project'''&lt;br /&gt;
* Execute the '''web''' project&lt;br /&gt;
* and about the '''web.xml''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| '''Slide 6'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''About slide'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| * Watch the video available at the following link&lt;br /&gt;
* It summarizes the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
'''About slide'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to contact at spoken hyphen tutorial dot org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 8&lt;br /&gt;
&lt;br /&gt;
Acknowledgement&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* http://spoken-tutorial.org/NMEICT- Intro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| '''Slide 9'''&lt;br /&gt;
&lt;br /&gt;
'''Contributor slide'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.106cm;&amp;quot;| The '''Library Management System''' has been contributed by a leading software '''MNC''', through their '''Corporate Social Responsibility''' programme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They have also validated the content for this spoken tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is Arya Ratish from IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/KTurtle/C3/Common-Errors-in-KTurtle/English</id>
		<title>KTurtle/C3/Common-Errors-in-KTurtle/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/KTurtle/C3/Common-Errors-in-KTurtle/English"/>
				<updated>2013-03-13T10:17:19Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|border =1&lt;br /&gt;
!Visual Cue&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 1&lt;br /&gt;
||Hello everybody.&lt;br /&gt;
&lt;br /&gt;
Welcome to this tutorial on '''Common Errors'''  in '''KTurtle.'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide  Number 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
||In this tutorial, we will learn about&lt;br /&gt;
* '''Syntax errors'''  &lt;br /&gt;
&lt;br /&gt;
* '''Runtime errors'''  and&lt;br /&gt;
&lt;br /&gt;
* '''Logical errors'''&lt;br /&gt;
|-&lt;br /&gt;
|| Slide Number 3&lt;br /&gt;
&lt;br /&gt;
'''System Requirement'''&lt;br /&gt;
||To record this tutorial I am using,&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu''' '''Linux''' OS version 12.04. &lt;br /&gt;
&lt;br /&gt;
'''KTurtle''' version. 0.8.1 beta.&lt;br /&gt;
|-&lt;br /&gt;
||Slide  Number 4&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
||We assume that you have basic working knowledge of '''KTurtle'''  &lt;br /&gt;
&lt;br /&gt;
If not, &lt;br /&gt;
&lt;br /&gt;
for relevant tutorials, please visit our website. &lt;br /&gt;
&lt;br /&gt;
'''http://spoken-tutorial.org'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 5&lt;br /&gt;
&lt;br /&gt;
'''Definition of Error'''&lt;br /&gt;
||Let's first define,  What is an error ?&lt;br /&gt;
&lt;br /&gt;
'''Error''' is a mistake in a program that produces an '''incorrect''' or '''unexpected''' result.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||First I will explain about '''&amp;quot;Types of errors&amp;quot;.'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide  Number 5&lt;br /&gt;
&lt;br /&gt;
'''Syntax Errors'''&lt;br /&gt;
&lt;br /&gt;
||A '''syntax error''' is a '''violation of  grammatical rules''', of a '''programming language'''.&lt;br /&gt;
&lt;br /&gt;
'''Compilation''' fails when a program has '''syntax errors'''.&lt;br /&gt;
&lt;br /&gt;
'''Syntax errors''' are easy to find and fix.&lt;br /&gt;
&lt;br /&gt;
For Example:  &lt;br /&gt;
&lt;br /&gt;
* '''Unmatched parentheses''', '''square brackets''' and '''curly braces'''. &lt;br /&gt;
&lt;br /&gt;
* Use of ''' variable''' that has not been '''declared'''.&lt;br /&gt;
&lt;br /&gt;
* Missing '''quotes''' in '''strings.'''&lt;br /&gt;
|-&lt;br /&gt;
||Switch to KTurtle Application&lt;br /&gt;
&lt;br /&gt;
Dash  home &amp;gt;&amp;gt;In the Search bar type KTurtle&lt;br /&gt;
&lt;br /&gt;
Click on the  KTurtle icon.&lt;br /&gt;
||Let's open a new '''KTurtle''' Application.&lt;br /&gt;
&lt;br /&gt;
Click on  '''Dash  home'''. In the Search bar, type '''KTurtle.'''&lt;br /&gt;
&lt;br /&gt;
Click on the  '''KTurtle''' icon.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||Let's begin the tutorial with some types of''' syntax errors'''.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
||'''Comment code''' &lt;br /&gt;
||To explain the '''error''' in the program, I will comment part of the code. &lt;br /&gt;
|-&lt;br /&gt;
||Highlight &lt;br /&gt;
&lt;br /&gt;
'''$a=ask &amp;quot;enter any number and click Ok&amp;quot;'''&lt;br /&gt;
||Here, I will comment the line &lt;br /&gt;
&lt;br /&gt;
'''$a=ask within double quotes &amp;quot;enter any number and click Ok&amp;quot;'''&lt;br /&gt;
|-&lt;br /&gt;
||Type #&lt;br /&gt;
||I will use '''hash(#)''' sign to comment the line.&lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''#$a=ask &amp;quot;enter any number and click ok&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''print $a^3'''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
||I will copy the program from text editor and paste it into '''Kturtle's''' Editor.&lt;br /&gt;
&lt;br /&gt;
Pause the tutorial here and type the program your into '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's click on '''Run''' button to run the program &lt;br /&gt;
&lt;br /&gt;
'''Complier''' shows the following error,&lt;br /&gt;
&lt;br /&gt;
''' variable &amp;quot;$a&amp;quot; was used without first being assigned  to a value.'''&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 4'''&lt;br /&gt;
||Here the error is in line number 4.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||'''Syntax error'''&lt;br /&gt;
||This is a '''syntax error'''. It occured, as the variable  'a' was not declared.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''$a=ask &amp;quot;enter any number and click Ok&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''Remove the comment'''&lt;br /&gt;
||So I will go to line number 2 remove the comment.&lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$a=ask &amp;quot;enter a number and click ok&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''print $a^3 '''&lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
|| I will copy the program from text Editor and paste it into''' KTurtle's editor'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's click on '''Run''' button to run the program &lt;br /&gt;
&lt;br /&gt;
Enter '''6''' for '''a''' value and click OK&lt;br /&gt;
&lt;br /&gt;
Program runs without errors. &lt;br /&gt;
|-&lt;br /&gt;
||'''clear command'''&lt;br /&gt;
||I will clear the current program from '''KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
Type '''clear''' command and '''Run''' to clean the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|| let's next look about another error.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
||Here the value of &amp;quot;'''pi'''&amp;quot; is '''predefined''' in KTurtle.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight $ &lt;br /&gt;
||Let's delete the &amp;quot;'''$'''&amp;quot; sign in the program. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''degree=ask &amp;quot;enter an angle value and click OK&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print  &amp;quot;Value in radians is&amp;quot;+ &amp;quot;  &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
||I will copy the program from text editor and paste it into ''' Kturtle's Editor''' &lt;br /&gt;
&lt;br /&gt;
Pause the tutorial and type the program your into '''KTurtle editor''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's Click on '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
'''Complier''' shows the following error,&lt;br /&gt;
&lt;br /&gt;
'''you cannot put “=” here'''&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 2'''&lt;br /&gt;
||This error is in line number 2. &lt;br /&gt;
|-&lt;br /&gt;
||'''Show error'''&lt;br /&gt;
||This is a '''syntax error''' it occured, as there is no '''container  of variable.'''&lt;br /&gt;
|-&lt;br /&gt;
||'''Replace $ sign''' &lt;br /&gt;
||Let's go back to the program replace the $ sign.&lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$degree=ask &amp;quot;enter an angle value and click OK&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree '''&lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Value in radians is&amp;quot;+ &amp;quot; &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
||I will copy the program from text editor and paste it into '''KTurtle's''' Editor &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||let's click on '''Run''' button to run the program.&lt;br /&gt;
&lt;br /&gt;
Enter '''45''' for angle value and click '''OK'''&lt;br /&gt;
&lt;br /&gt;
Program runs without errors.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''&amp;quot;enter an angle value and click OK&amp;quot; '''&lt;br /&gt;
||Let's remove one of the quotes of the string. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$degree=ask &amp;quot;enter an angle value and click OK'''&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Value in radians is&amp;quot;+ &amp;quot; &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide''' &lt;br /&gt;
|| I will Copy the program from text editor and paste it into '''KTurtle's ''' Editor &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Click on  '''Run''' button to run the program&lt;br /&gt;
&lt;br /&gt;
'''Complier''' shows the following error,&lt;br /&gt;
&lt;br /&gt;
'''Text string was not properly closed, expected a double quote “ ” to close the string.'''&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 2'''&lt;br /&gt;
||Here the error is in line number 2. &lt;br /&gt;
|-&lt;br /&gt;
||'''Replace the quotes''' &lt;br /&gt;
|| I will  go to line number 2 and replace the quotes. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$degree=ask &amp;quot;enter an angle value and click OK&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Value in radians is&amp;quot;+ &amp;quot; &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide''' &lt;br /&gt;
||&lt;br /&gt;
I will copy the program from text editor and paste it into''' Kturtle's''' Editor &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Click on '''Run''' button to run the program&lt;br /&gt;
&lt;br /&gt;
Enter '''45''' for angle value and click OK.&lt;br /&gt;
&lt;br /&gt;
Program runs without errors. &lt;br /&gt;
&lt;br /&gt;
This way you can find the line at which error has occured, and also correct it. &lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||Let's now learn about runtime errors.&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 6&lt;br /&gt;
&lt;br /&gt;
'''Runtime errors'''&lt;br /&gt;
||'''Run-time error''' occurs during the '''execution''' of a program. &lt;br /&gt;
&lt;br /&gt;
It may '''crash''' the program when you run it. &lt;br /&gt;
&lt;br /&gt;
'''Runtime errors''' are commonly due to wrong input from the user. &lt;br /&gt;
&lt;br /&gt;
'''Compiler''' cannnot find these '''errors'''.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* Trying to divide by a '''variable''' that contains no value.&lt;br /&gt;
&lt;br /&gt;
* Run a loop without a '''terminating condition''' or '''increment value'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''“clear” command''''&lt;br /&gt;
||I will clear the current program from the KTurtle editor.&lt;br /&gt;
&lt;br /&gt;
Type '''clear''' command and '''Run''' to clean the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight the program&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
&lt;br /&gt;
This program '''divides''' two numbers.&lt;br /&gt;
&lt;br /&gt;
'a' is''' dividend''' and 'r' is '''divisor'''. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$a=ask &amp;quot;enter a number for 'a' and click Ok&amp;quot;'''' &lt;br /&gt;
&lt;br /&gt;
'''$r = ask &amp;quot;enter a number for 'r' and click OK&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''$d=$a/$r'''&lt;br /&gt;
&lt;br /&gt;
'''print $d'''&lt;br /&gt;
||&lt;br /&gt;
I will copy the program from text editor and paste it into '''KTurtle's''' Editor. &lt;br /&gt;
&lt;br /&gt;
Pause the tutorial and type the program into your '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program. &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program''' &lt;br /&gt;
||Let's click on  '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
le'ts enter '''5''' for 'a' and click OK&lt;br /&gt;
&lt;br /&gt;
enter '''0''' for 'r' and click OK&lt;br /&gt;
&lt;br /&gt;
Here we get a ''' runtime error''' ,&lt;br /&gt;
&lt;br /&gt;
“'''you tried to divide by zero'''”&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 4'''&lt;br /&gt;
||This error is in line number 4.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run time error'''&lt;br /&gt;
||This error occurs as we cannot '''divide''' a number with''' zero'''.&lt;br /&gt;
|-&lt;br /&gt;
||Run the program &lt;br /&gt;
||Let's run the program again. &lt;br /&gt;
&lt;br /&gt;
Enter '''5''' for number and click OK &lt;br /&gt;
&lt;br /&gt;
enter '''2''' for 'r' and click OK &lt;br /&gt;
&lt;br /&gt;
Program without errors.&lt;br /&gt;
|-&lt;br /&gt;
||'''“clear” command'''&lt;br /&gt;
||I will clear the current program from '''KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
Type '''clear''' command and '''Run''' to clean the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||Next we will learn about ''' logical errors'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''Logical errors''' &lt;br /&gt;
&lt;br /&gt;
||'''Logical error''' is a mistake in a program's '''source code''' that results in '''incorrect''' or '''unexpected''' behavior.&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
'''Assigning''' a value to the wrong variable.&lt;br /&gt;
&lt;br /&gt;
'''Multiplying''' two numbers instead of '''adding'''.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=30 &lt;br /&gt;
&lt;br /&gt;
'''message&amp;quot;In while loop, code inside the loop repeats till boolean &lt;br /&gt;
&lt;br /&gt;
'''evaluates false&amp;quot; &lt;br /&gt;
&lt;br /&gt;
'''while $x&amp;gt;20''' { &lt;br /&gt;
&lt;br /&gt;
'''$x=$x+1''' &lt;br /&gt;
&lt;br /&gt;
'''fontsize 15''' &lt;br /&gt;
&lt;br /&gt;
'''forward 20''' &lt;br /&gt;
&lt;br /&gt;
'''print $x''' } &lt;br /&gt;
||I will copy the program from text editor and paste it into '''Kturtle's''' Editor &lt;br /&gt;
&lt;br /&gt;
Pause the tutorial here and type the program into your '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||'''Run the program''' &lt;br /&gt;
||Now click on the '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
A dialog box pops-up, let's click OK.&lt;br /&gt;
&lt;br /&gt;
Loop goes into an '''infinite loop'''. &lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''“ while”  loop condition'''&lt;br /&gt;
||We see that '''“while”''' loop prints numbers from 31 and it is still printing.&lt;br /&gt;
&lt;br /&gt;
This is a '''logical error'''.&lt;br /&gt;
&lt;br /&gt;
In the “while” condition x is greater than 20,&lt;br /&gt;
&lt;br /&gt;
but the '''variable''' x is always greater than 20&lt;br /&gt;
&lt;br /&gt;
So, the loop never '''terminates.'''&lt;br /&gt;
|-&lt;br /&gt;
||'''Abort the process''' &lt;br /&gt;
||I will click on '''Abort''' button to abort the process. &lt;br /&gt;
|-&lt;br /&gt;
||Change '''$x=$x+1''' to '''$x=$x-1'''&lt;br /&gt;
||Let's change $x=$x+1 to $x=$x-1. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=30''' &lt;br /&gt;
&lt;br /&gt;
'''message&amp;quot;In while loop, code inside the loop repeats till boolean &lt;br /&gt;
evaluates false&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''while $x&amp;gt;20 { '''&lt;br /&gt;
&lt;br /&gt;
''''$x=$x-1'''' &lt;br /&gt;
&lt;br /&gt;
'''fontsize 15''' &lt;br /&gt;
&lt;br /&gt;
'''forward 20''' &lt;br /&gt;
&lt;br /&gt;
'''print $x } '''&lt;br /&gt;
|| I will copy the program from text editor and paste it into '''KTurtle's''' editor.&lt;br /&gt;
|- &lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's click on '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
A dialog box pop-up let's click OK.&lt;br /&gt;
&lt;br /&gt;
Loop '''terminates''' after printing values from''' 29 to 20.''' &lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||With this we have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarise.&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 9&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
||In this tutorial we have learnt, errors and types of errors such as&lt;br /&gt;
&lt;br /&gt;
* Use of '''variable''' that has not been declared.&lt;br /&gt;
&lt;br /&gt;
* Missing '''quotes''' in strings.&lt;br /&gt;
&lt;br /&gt;
*''' Runtime errors''' and&lt;br /&gt;
&lt;br /&gt;
* '''Logical errors'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 10&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
||As an assignment I would like you to find errors in the given programs&lt;br /&gt;
|-&lt;br /&gt;
||'''Assignment 1'''&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=3''' &lt;br /&gt;
&lt;br /&gt;
'''$y=3''' &lt;br /&gt;
&lt;br /&gt;
'''if $x==$y'''&lt;br /&gt;
&lt;br /&gt;
'''print&amp;quot;they are equal&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''else''' &lt;br /&gt;
{ &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;they are not equal&amp;quot;'''} &lt;br /&gt;
|- &lt;br /&gt;
||'''Assignment 2'''&lt;br /&gt;
||'''program to find the nth term and sum of n terms in GP'''&lt;br /&gt;
&lt;br /&gt;
'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=ask &amp;quot;enter value for x and click Ok&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''$y = ask &amp;quot;enter value for y and click''' Ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''$g =sqrt ($x*$y)'''&lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Geometric mean is =&amp;quot;+'''&lt;br /&gt;
|-&lt;br /&gt;
||'''Assignment 3'''&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''learn sum $x {''' &lt;br /&gt;
&lt;br /&gt;
'''{$r=0''' &lt;br /&gt;
&lt;br /&gt;
'''for $i= 1 to $x{''' &lt;br /&gt;
&lt;br /&gt;
'''return $r}''' &lt;br /&gt;
&lt;br /&gt;
'''}''' &lt;br /&gt;
&lt;br /&gt;
'''print'''  &lt;br /&gt;
|-&lt;br /&gt;
||Slide number 11&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgement'''&lt;br /&gt;
||Watch the video available at this URL&lt;br /&gt;
http://spoken-tutorial.org/What is a Spoken Tutorial &lt;br /&gt;
It summarises the Spoken Tutorial project &lt;br /&gt;
If you do not have good bandwidth, &lt;br /&gt;
you can download and watch it &lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
Slide Number 12&lt;br /&gt;
||The Spoken Tutorial Project Team :&lt;br /&gt;
&lt;br /&gt;
Conducts workshops using spoken tutorials &lt;br /&gt;
Gives certificates to those who pass an online test &lt;br /&gt;
For more details, please write to&lt;br /&gt;
contact@spoken-tutorial.org&lt;br /&gt;
|-&lt;br /&gt;
||Slide number 13 &lt;br /&gt;
||Spoken Tutorial Project is a part  of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
More information on this Mission is available at this link&lt;br /&gt;
http://spoken-tutorial.org/NMEICT-Intro ]&lt;br /&gt;
&lt;br /&gt;
This is Madhuri Ganpathi from IIT Bombay signing off.&lt;br /&gt;
Thank you  for joining&lt;br /&gt;
|-&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/KTurtle/C3/Common-Errors-in-KTurtle/English</id>
		<title>KTurtle/C3/Common-Errors-in-KTurtle/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/KTurtle/C3/Common-Errors-in-KTurtle/English"/>
				<updated>2013-03-13T10:16:25Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|border =1&lt;br /&gt;
!Visual Cue&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 1&lt;br /&gt;
||Hello everybody.&lt;br /&gt;
&lt;br /&gt;
Welcome to this tutorial on '''Common Errors'''  in '''KTurtle.'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide  Number 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
||In this tutorial, we will learn about&lt;br /&gt;
* '''Syntax errors'''  &lt;br /&gt;
&lt;br /&gt;
* '''Runtime errors'''  and&lt;br /&gt;
&lt;br /&gt;
* '''Logical errors'''&lt;br /&gt;
|-&lt;br /&gt;
|| Slide Number 3&lt;br /&gt;
&lt;br /&gt;
'''System Requirement'''&lt;br /&gt;
||To record this tutorial I am using,&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu''' Linux OS version 12.04. &lt;br /&gt;
&lt;br /&gt;
'''KTurtle''' version. 0.8.1 beta.&lt;br /&gt;
|-&lt;br /&gt;
||Slide  Number 4&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
||We assume that you have basic working knowledge of '''KTurtle'''  &lt;br /&gt;
&lt;br /&gt;
If not, &lt;br /&gt;
&lt;br /&gt;
for relevant tutorials, please visit our website. &lt;br /&gt;
&lt;br /&gt;
'''http://spoken-tutorial.org'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 5&lt;br /&gt;
&lt;br /&gt;
'''Definition of Error'''&lt;br /&gt;
||Let's first define,  What is an error ?&lt;br /&gt;
&lt;br /&gt;
'''Error''' is a mistake in a program that produces an '''incorrect''' or '''unexpected''' result.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||First I will explain about '''&amp;quot;Types of errors&amp;quot;.'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide  Number 5&lt;br /&gt;
&lt;br /&gt;
'''Syntax Errors'''&lt;br /&gt;
&lt;br /&gt;
||A '''syntax error''' is a '''violation of  grammatical rules''', of a '''programming language'''.&lt;br /&gt;
&lt;br /&gt;
'''Compilation''' fails when a program has '''syntax errors'''.&lt;br /&gt;
&lt;br /&gt;
'''Syntax errors''' are easy to find and fix.&lt;br /&gt;
&lt;br /&gt;
For Example:  &lt;br /&gt;
&lt;br /&gt;
* '''Unmatched parentheses''', '''square brackets''' and '''curly braces'''. &lt;br /&gt;
&lt;br /&gt;
* Use of ''' variable''' that has not been '''declared'''.&lt;br /&gt;
&lt;br /&gt;
* Missing '''quotes''' in '''strings.'''&lt;br /&gt;
|-&lt;br /&gt;
||Switch to KTurtle Application&lt;br /&gt;
&lt;br /&gt;
Dash  home &amp;gt;&amp;gt;In the Search bar type KTurtle&lt;br /&gt;
&lt;br /&gt;
Click on the  KTurtle icon.&lt;br /&gt;
||Let's open a new '''KTurtle''' Application.&lt;br /&gt;
&lt;br /&gt;
Click on  '''Dash  home'''. In the Search bar, type '''KTurtle.'''&lt;br /&gt;
&lt;br /&gt;
Click on the  '''KTurtle''' icon.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||Let's begin the tutorial with some types of''' syntax errors'''.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
||'''Comment code''' &lt;br /&gt;
||To explain the '''error''' in the program, I will comment part of the code. &lt;br /&gt;
|-&lt;br /&gt;
||Highlight &lt;br /&gt;
&lt;br /&gt;
'''$a=ask &amp;quot;enter any number and click Ok&amp;quot;'''&lt;br /&gt;
||Here, I will comment the line &lt;br /&gt;
&lt;br /&gt;
'''$a=ask within double quotes &amp;quot;enter any number and click Ok&amp;quot;'''&lt;br /&gt;
|-&lt;br /&gt;
||Type #&lt;br /&gt;
||I will use '''hash(#)''' sign to comment the line.&lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''#$a=ask &amp;quot;enter any number and click ok&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''print $a^3'''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
||I will copy the program from text editor and paste it into '''Kturtle's''' Editor.&lt;br /&gt;
&lt;br /&gt;
Pause the tutorial here and type the program your into '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's click on '''Run''' button to run the program &lt;br /&gt;
&lt;br /&gt;
'''Complier''' shows the following error,&lt;br /&gt;
&lt;br /&gt;
''' variable &amp;quot;$a&amp;quot; was used without first being assigned  to a value.'''&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 4'''&lt;br /&gt;
||Here the error is in line number 4.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||'''Syntax error'''&lt;br /&gt;
||This is a '''syntax error'''. It occured, as the variable  'a' was not declared.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''$a=ask &amp;quot;enter any number and click Ok&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''Remove the comment'''&lt;br /&gt;
||So I will go to line number 2 remove the comment.&lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$a=ask &amp;quot;enter a number and click ok&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''print $a^3 '''&lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
|| I will copy the program from text Editor and paste it into''' KTurtle's editor'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's click on '''Run''' button to run the program &lt;br /&gt;
&lt;br /&gt;
Enter '''6''' for '''a''' value and click OK&lt;br /&gt;
&lt;br /&gt;
Program runs without errors. &lt;br /&gt;
|-&lt;br /&gt;
||'''clear command'''&lt;br /&gt;
||I will clear the current program from '''KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
Type '''clear''' command and '''Run''' to clean the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|| let's next look about another error.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
||Here the value of &amp;quot;'''pi'''&amp;quot; is '''predefined''' in KTurtle.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight $ &lt;br /&gt;
||Let's delete the &amp;quot;'''$'''&amp;quot; sign in the program. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''degree=ask &amp;quot;enter an angle value and click OK&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print  &amp;quot;Value in radians is&amp;quot;+ &amp;quot;  &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
||I will copy the program from text editor and paste it into ''' Kturtle's Editor''' &lt;br /&gt;
&lt;br /&gt;
Pause the tutorial and type the program your into '''KTurtle editor''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's Click on '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
'''Complier''' shows the following error,&lt;br /&gt;
&lt;br /&gt;
'''you cannot put “=” here'''&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 2'''&lt;br /&gt;
||This error is in line number 2. &lt;br /&gt;
|-&lt;br /&gt;
||'''Show error'''&lt;br /&gt;
||This is a '''syntax error''' it occured, as there is no '''container  of variable.'''&lt;br /&gt;
|-&lt;br /&gt;
||'''Replace $ sign''' &lt;br /&gt;
||Let's go back to the program replace the $ sign.&lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$degree=ask &amp;quot;enter an angle value and click OK&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree '''&lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Value in radians is&amp;quot;+ &amp;quot; &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
||I will copy the program from text editor and paste it into '''KTurtle's''' Editor &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||let's click on '''Run''' button to run the program.&lt;br /&gt;
&lt;br /&gt;
Enter '''45''' for angle value and click '''OK'''&lt;br /&gt;
&lt;br /&gt;
Program runs without errors.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''&amp;quot;enter an angle value and click OK&amp;quot; '''&lt;br /&gt;
||Let's remove one of the quotes of the string. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$degree=ask &amp;quot;enter an angle value and click OK'''&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Value in radians is&amp;quot;+ &amp;quot; &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide''' &lt;br /&gt;
|| I will Copy the program from text editor and paste it into '''KTurtle's ''' Editor &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Click on  '''Run''' button to run the program&lt;br /&gt;
&lt;br /&gt;
'''Complier''' shows the following error,&lt;br /&gt;
&lt;br /&gt;
'''Text string was not properly closed, expected a double quote “ ” to close the string.'''&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 2'''&lt;br /&gt;
||Here the error is in line number 2. &lt;br /&gt;
|-&lt;br /&gt;
||'''Replace the quotes''' &lt;br /&gt;
|| I will  go to line number 2 and replace the quotes. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$degree=ask &amp;quot;enter an angle value and click OK&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Value in radians is&amp;quot;+ &amp;quot; &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide''' &lt;br /&gt;
||&lt;br /&gt;
I will copy the program from text editor and paste it into''' Kturtle's''' Editor &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Click on '''Run''' button to run the program&lt;br /&gt;
&lt;br /&gt;
Enter '''45''' for angle value and click OK.&lt;br /&gt;
&lt;br /&gt;
Program runs without errors. &lt;br /&gt;
&lt;br /&gt;
This way you can find the line at which error has occured, and also correct it. &lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||Let's now learn about runtime errors.&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 6&lt;br /&gt;
&lt;br /&gt;
'''Runtime errors'''&lt;br /&gt;
||'''Run-time error''' occurs during the '''execution''' of a program. &lt;br /&gt;
&lt;br /&gt;
It may '''crash''' the program when you run it. &lt;br /&gt;
&lt;br /&gt;
'''Runtime errors''' are commonly due to wrong input from the user. &lt;br /&gt;
&lt;br /&gt;
'''Compiler''' cannnot find these '''errors'''.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* Trying to divide by a '''variable''' that contains no value.&lt;br /&gt;
&lt;br /&gt;
* Run a loop without a '''terminating condition''' or '''increment value'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''“clear” command''''&lt;br /&gt;
||I will clear the current program from the KTurtle editor.&lt;br /&gt;
&lt;br /&gt;
Type '''clear''' command and '''Run''' to clean the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight the program&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
&lt;br /&gt;
This program '''divides''' two numbers.&lt;br /&gt;
&lt;br /&gt;
'a' is''' dividend''' and 'r' is '''divisor'''. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$a=ask &amp;quot;enter a number for 'a' and click Ok&amp;quot;'''' &lt;br /&gt;
&lt;br /&gt;
'''$r = ask &amp;quot;enter a number for 'r' and click OK&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''$d=$a/$r'''&lt;br /&gt;
&lt;br /&gt;
'''print $d'''&lt;br /&gt;
||&lt;br /&gt;
I will copy the program from text editor and paste it into '''KTurtle's''' Editor. &lt;br /&gt;
&lt;br /&gt;
Pause the tutorial and type the program into your '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program. &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program''' &lt;br /&gt;
||Let's click on  '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
le'ts enter '''5''' for 'a' and click OK&lt;br /&gt;
&lt;br /&gt;
enter '''0''' for 'r' and click OK&lt;br /&gt;
&lt;br /&gt;
Here we get a ''' runtime error''' ,&lt;br /&gt;
&lt;br /&gt;
“'''you tried to divide by zero'''”&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 4'''&lt;br /&gt;
||This error is in line number 4.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run time error'''&lt;br /&gt;
||This error occurs as we cannot '''divide''' a number with''' zero'''.&lt;br /&gt;
|-&lt;br /&gt;
||Run the program &lt;br /&gt;
||Let's run the program again. &lt;br /&gt;
&lt;br /&gt;
Enter '''5''' for number and click OK &lt;br /&gt;
&lt;br /&gt;
enter '''2''' for 'r' and click OK &lt;br /&gt;
&lt;br /&gt;
Program without errors.&lt;br /&gt;
|-&lt;br /&gt;
||'''“clear” command'''&lt;br /&gt;
||I will clear the current program from '''KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
Type '''clear''' command and '''Run''' to clean the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||Next we will learn about ''' logical errors'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''Logical errors''' &lt;br /&gt;
&lt;br /&gt;
||'''Logical error''' is a mistake in a program's '''source code''' that results in '''incorrect''' or '''unexpected''' behavior.&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
'''Assigning''' a value to the wrong variable.&lt;br /&gt;
&lt;br /&gt;
'''Multiplying''' two numbers instead of '''adding'''.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=30 &lt;br /&gt;
&lt;br /&gt;
'''message&amp;quot;In while loop, code inside the loop repeats till boolean &lt;br /&gt;
&lt;br /&gt;
'''evaluates false&amp;quot; &lt;br /&gt;
&lt;br /&gt;
'''while $x&amp;gt;20''' { &lt;br /&gt;
&lt;br /&gt;
'''$x=$x+1''' &lt;br /&gt;
&lt;br /&gt;
'''fontsize 15''' &lt;br /&gt;
&lt;br /&gt;
'''forward 20''' &lt;br /&gt;
&lt;br /&gt;
'''print $x''' } &lt;br /&gt;
||I will copy the program from text editor and paste it into '''Kturtle's''' Editor &lt;br /&gt;
&lt;br /&gt;
Pause the tutorial here and type the program into your '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||'''Run the program''' &lt;br /&gt;
||Now click on the '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
A dialog box pops-up, let's click OK.&lt;br /&gt;
&lt;br /&gt;
Loop goes into an '''infinite loop'''. &lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''“ while”  loop condition'''&lt;br /&gt;
||We see that '''“while”''' loop prints numbers from 31 and it is still printing.&lt;br /&gt;
&lt;br /&gt;
This is a '''logical error'''.&lt;br /&gt;
&lt;br /&gt;
In the “while” condition x is greater than 20,&lt;br /&gt;
&lt;br /&gt;
but the '''variable''' x is always greater than 20&lt;br /&gt;
&lt;br /&gt;
So, the loop never '''terminates.'''&lt;br /&gt;
|-&lt;br /&gt;
||'''Abort the process''' &lt;br /&gt;
||I will click on '''Abort''' button to abort the process. &lt;br /&gt;
|-&lt;br /&gt;
||Change '''$x=$x+1''' to '''$x=$x-1'''&lt;br /&gt;
||Let's change $x=$x+1 to $x=$x-1. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=30''' &lt;br /&gt;
&lt;br /&gt;
'''message&amp;quot;In while loop, code inside the loop repeats till boolean &lt;br /&gt;
evaluates false&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''while $x&amp;gt;20 { '''&lt;br /&gt;
&lt;br /&gt;
''''$x=$x-1'''' &lt;br /&gt;
&lt;br /&gt;
'''fontsize 15''' &lt;br /&gt;
&lt;br /&gt;
'''forward 20''' &lt;br /&gt;
&lt;br /&gt;
'''print $x } '''&lt;br /&gt;
|| I will copy the program from text editor and paste it into '''KTurtle's''' editor.&lt;br /&gt;
|- &lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's click on '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
A dialog box pop-up let's click OK.&lt;br /&gt;
&lt;br /&gt;
Loop '''terminates''' after printing values from''' 29 to 20.''' &lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||With this we have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarise.&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 9&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
||In this tutorial we have learnt, errors and types of errors such as&lt;br /&gt;
&lt;br /&gt;
* Use of '''variable''' that has not been declared.&lt;br /&gt;
&lt;br /&gt;
* Missing '''quotes''' in strings.&lt;br /&gt;
&lt;br /&gt;
*''' Runtime errors''' and&lt;br /&gt;
&lt;br /&gt;
* '''Logical errors'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 10&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
||As an assignment I would like you to find errors in the given programs&lt;br /&gt;
|-&lt;br /&gt;
||'''Assignment 1'''&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=3''' &lt;br /&gt;
&lt;br /&gt;
'''$y=3''' &lt;br /&gt;
&lt;br /&gt;
'''if $x==$y'''&lt;br /&gt;
&lt;br /&gt;
'''print&amp;quot;they are equal&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''else''' &lt;br /&gt;
{ &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;they are not equal&amp;quot;'''} &lt;br /&gt;
|- &lt;br /&gt;
||'''Assignment 2'''&lt;br /&gt;
||'''program to find the nth term and sum of n terms in GP'''&lt;br /&gt;
&lt;br /&gt;
'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=ask &amp;quot;enter value for x and click Ok&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''$y = ask &amp;quot;enter value for y and click''' Ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''$g =sqrt ($x*$y)'''&lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Geometric mean is =&amp;quot;+'''&lt;br /&gt;
|-&lt;br /&gt;
||'''Assignment 3'''&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''learn sum $x {''' &lt;br /&gt;
&lt;br /&gt;
'''{$r=0''' &lt;br /&gt;
&lt;br /&gt;
'''for $i= 1 to $x{''' &lt;br /&gt;
&lt;br /&gt;
'''return $r}''' &lt;br /&gt;
&lt;br /&gt;
'''}''' &lt;br /&gt;
&lt;br /&gt;
'''print'''  &lt;br /&gt;
|-&lt;br /&gt;
||Slide number 11&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgement'''&lt;br /&gt;
||Watch the video available at this URL&lt;br /&gt;
http://spoken-tutorial.org/What is a Spoken Tutorial &lt;br /&gt;
It summarises the Spoken Tutorial project &lt;br /&gt;
If you do not have good bandwidth, &lt;br /&gt;
you can download and watch it &lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
Slide Number 12&lt;br /&gt;
||The Spoken Tutorial Project Team :&lt;br /&gt;
&lt;br /&gt;
Conducts workshops using spoken tutorials &lt;br /&gt;
Gives certificates to those who pass an online test &lt;br /&gt;
For more details, please write to&lt;br /&gt;
contact@spoken-tutorial.org&lt;br /&gt;
|-&lt;br /&gt;
||Slide number 13 &lt;br /&gt;
||Spoken Tutorial Project is a part  of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
More information on this Mission is available at this link&lt;br /&gt;
http://spoken-tutorial.org/NMEICT-Intro ]&lt;br /&gt;
&lt;br /&gt;
This is Madhuri Ganpathi from IIT Bombay signing off.&lt;br /&gt;
Thank you  for joining&lt;br /&gt;
|-&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/KTurtle/C3/Common-Errors-in-KTurtle/English</id>
		<title>KTurtle/C3/Common-Errors-in-KTurtle/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/KTurtle/C3/Common-Errors-in-KTurtle/English"/>
				<updated>2013-03-13T10:10:09Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|border =1&lt;br /&gt;
!Visual Cue&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 1&lt;br /&gt;
||Hello everybody.&lt;br /&gt;
&lt;br /&gt;
Welcome to this tutorial on '''Common Errors'''  in '''KTurtle.'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide  Number 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
||In this tutorial, we will learn about&lt;br /&gt;
* '''Syntax errors'''  &lt;br /&gt;
&lt;br /&gt;
* '''Runtime errors'''  and&lt;br /&gt;
&lt;br /&gt;
* '''Logical errors'''&lt;br /&gt;
|-&lt;br /&gt;
|| Slide Number 3&lt;br /&gt;
&lt;br /&gt;
'''System Requirement'''&lt;br /&gt;
||To record this tutorial I am using,&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu''' Linux OS version 12.04. &lt;br /&gt;
&lt;br /&gt;
'''KTurtle''' version. 0.8.1 beta.&lt;br /&gt;
|-&lt;br /&gt;
||Slide  Number 4&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
||We assume that you have basic working knowledge of '''KTurtle'''  &lt;br /&gt;
&lt;br /&gt;
If not, &lt;br /&gt;
&lt;br /&gt;
for relevant tutorials, please visit our website. &lt;br /&gt;
&lt;br /&gt;
'''http://spoken-tutorial.org'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 5&lt;br /&gt;
&lt;br /&gt;
'''Definition of Error'''&lt;br /&gt;
||Let's first define,  What is an error ?&lt;br /&gt;
&lt;br /&gt;
'''Error''' is a mistake in a program that produces an '''incorrect''' or '''unexpected''' result.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||First I will explain about '''&amp;quot;Types of errors&amp;quot;.'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide  Number 5&lt;br /&gt;
&lt;br /&gt;
'''Syntax Errors'''&lt;br /&gt;
&lt;br /&gt;
||A '''syntax error''' is a '''violation of  grammatical rules''', of a '''programming language'''.&lt;br /&gt;
&lt;br /&gt;
'''Compilation''' fails when a program has '''syntax errors'''.&lt;br /&gt;
&lt;br /&gt;
'''Syntax errors''' are easy to find and fix.&lt;br /&gt;
&lt;br /&gt;
For Example:  &lt;br /&gt;
&lt;br /&gt;
* '''Unmatched parentheses''', '''square brackets''' and '''curly braces'''. &lt;br /&gt;
&lt;br /&gt;
* Use of ''' variable''' that has not been '''declared'''.&lt;br /&gt;
&lt;br /&gt;
* Missing '''quotes''' in '''strings.'''&lt;br /&gt;
|-&lt;br /&gt;
||Switch to KTurtle Application&lt;br /&gt;
&lt;br /&gt;
Dash  home &amp;gt;&amp;gt;In the Search bar type KTurtle&lt;br /&gt;
&lt;br /&gt;
Click on the  KTurtle icon.&lt;br /&gt;
||Let's open a new '''KTurtle''' Application.&lt;br /&gt;
&lt;br /&gt;
Click on  '''Dash  home'''. In the Search bar, type '''KTurtle.'''&lt;br /&gt;
&lt;br /&gt;
Click on the  '''KTurtle''' icon.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||Let's begin the tutorial with some types of''' syntax errors'''.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
||'''Comment code''' &lt;br /&gt;
||To explain the '''error''' in the program, I will comment part of the code. &lt;br /&gt;
|-&lt;br /&gt;
||Highlight &lt;br /&gt;
&lt;br /&gt;
'''$a=ask &amp;quot;enter any number and click Ok&amp;quot;'''&lt;br /&gt;
||Here, I will comment the line &lt;br /&gt;
&lt;br /&gt;
'''$a=ask within double quotes &amp;quot;enter any number and click Ok&amp;quot;'''&lt;br /&gt;
|-&lt;br /&gt;
||Type #&lt;br /&gt;
||I will use '''hash(#)''' sign to comment the line.&lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''#$a=ask &amp;quot;enter any number and click ok&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''print $a^3'''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
||I will copy the program from text editor and paste it into '''Kturtle's''' Editor.&lt;br /&gt;
&lt;br /&gt;
Pause the tutorial here and type the program your into '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's click on '''Run''' button to run the program &lt;br /&gt;
&lt;br /&gt;
'''Complier''' shows the following error,&lt;br /&gt;
&lt;br /&gt;
''' variable &amp;quot;$a&amp;quot; was used without first being assigned  to a value.'''&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 4'''&lt;br /&gt;
||Here the error is in line number 4.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||'''Syntax error'''&lt;br /&gt;
||This is a '''syntax error'''. It occured, as the variable  'a' was not declared.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''$a=ask &amp;quot;enter any number and click Ok&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''Remove the comment'''&lt;br /&gt;
||So I will go to line number 2 remove the comment.&lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$a=ask &amp;quot;enter a number and click ok&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''print $a^3 '''&lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
|| I will copy the program from text Editor and paste it into''' KTurtle's editor'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's click on '''Run''' button to run the program &lt;br /&gt;
&lt;br /&gt;
Enter '''6''' for '''a''' value and click OK&lt;br /&gt;
&lt;br /&gt;
Program runs without errors. &lt;br /&gt;
|-&lt;br /&gt;
||'''clear command'''&lt;br /&gt;
||I will clear the current program from '''KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
Type '''clear''' command and '''Run''' to clean the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|| let's next look about another error.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
||Here the value of &amp;quot;pi&amp;quot; is '''predefined''' in KTurtle.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight $ &lt;br /&gt;
||Let's delete the &amp;quot;$&amp;quot; sign in the program. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''degree=ask &amp;quot;enter an angle value and click OK&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print  &amp;quot;Value in radians is&amp;quot;+ &amp;quot;  &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
||I will copy the program from text editor and paste it into ''' Kturtle's ''' Editor&lt;br /&gt;
&lt;br /&gt;
Pause the tutorial and type the program your into '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's Click on '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
'''Complier''' shows the following error,&lt;br /&gt;
&lt;br /&gt;
'''you cannot put “=” here'''&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 2'''&lt;br /&gt;
||This error is in line number 2. &lt;br /&gt;
|-&lt;br /&gt;
||'''Show error'''&lt;br /&gt;
||This is a '''syntax error''' it occured, as there is no '''container  of variable.'''&lt;br /&gt;
|-&lt;br /&gt;
||'''Replace $ sign''' &lt;br /&gt;
||Let's go back to the program replace the $ sign.&lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$degree=ask &amp;quot;enter an angle value and click OK&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree '''&lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Value in radians is&amp;quot;+ &amp;quot; &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide'''&lt;br /&gt;
||I will copy the program from text editor and paste it into '''KTurtle's''' Editor &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||let's click on '''Run''' button to run the program.&lt;br /&gt;
&lt;br /&gt;
Enter '''45''' for angle value and click '''OK'''&lt;br /&gt;
&lt;br /&gt;
Program runs without errors.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''&amp;quot;enter an angle value and click OK&amp;quot; '''&lt;br /&gt;
||Let's remove one of the quotes of the string. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$degree=ask &amp;quot;enter an angle value and click OK'''&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Value in radians is&amp;quot;+ &amp;quot; &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide''' &lt;br /&gt;
|| I will Copy the program from text editor and paste it into '''KTurtle's ''' Editor &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Click on  '''Run''' button to run the program&lt;br /&gt;
&lt;br /&gt;
'''Complier''' shows the following error,&lt;br /&gt;
&lt;br /&gt;
'''Text string was not properly closed, expected a double quote “ ” to close the string.'''&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 2'''&lt;br /&gt;
||Here the error is in line number 2. &lt;br /&gt;
|-&lt;br /&gt;
||'''Replace the quotes''' &lt;br /&gt;
|| I will  go to line number 2 and replace the quotes. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$degree=ask &amp;quot;enter an angle value and click OK&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''$radian=(pi/180)*$degree''' &lt;br /&gt;
&lt;br /&gt;
'''go 50,50''' &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Value in radians is&amp;quot;+ &amp;quot; &amp;quot; +$radian''' &lt;br /&gt;
&lt;br /&gt;
'''spritehide''' &lt;br /&gt;
||&lt;br /&gt;
I will copy the program from text editor and paste it into''' Kturtle's''' Editor &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Click on '''Run''' button to run the program&lt;br /&gt;
&lt;br /&gt;
Enter '''45''' for angle value and click OK.&lt;br /&gt;
&lt;br /&gt;
Program runs without errors. &lt;br /&gt;
&lt;br /&gt;
This way you can find the line at which error has occured, and also correct it. &lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||Let's now learn about runtime errors.&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 6&lt;br /&gt;
&lt;br /&gt;
'''Runtime errors'''&lt;br /&gt;
||'''Run-time error''' occurs during the '''execution''' of a program. &lt;br /&gt;
&lt;br /&gt;
It may '''crash''' the program when you run it. &lt;br /&gt;
&lt;br /&gt;
'''Runtime errors''' are commonly due to wrong input from the user. &lt;br /&gt;
&lt;br /&gt;
'''Compiler''' cannnot find these '''errors'''.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* Trying to divide by a '''variable''' that contains no value.&lt;br /&gt;
&lt;br /&gt;
* Run a loop without a '''terminating condition''' or '''increment value'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''“clear” command''''&lt;br /&gt;
||I will clear the current program from the KTurtle editor.&lt;br /&gt;
&lt;br /&gt;
Type '''clear''' command and '''Run''' to clean the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||Highlight the program&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
&lt;br /&gt;
This program '''divides''' two numbers.&lt;br /&gt;
&lt;br /&gt;
'a' is''' dividend''' and 'r' is '''divisor'''. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$a=ask &amp;quot;enter a number for 'a' and click Ok&amp;quot;'''' &lt;br /&gt;
&lt;br /&gt;
'''$r = ask &amp;quot;enter a number for 'r' and click OK&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''$d=$a/$r'''&lt;br /&gt;
&lt;br /&gt;
'''print $d'''&lt;br /&gt;
||&lt;br /&gt;
I will copy the program from text editor and paste it into '''KTurtle's''' Editor. &lt;br /&gt;
&lt;br /&gt;
Pause the tutorial and type the program into your '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program. &lt;br /&gt;
|-&lt;br /&gt;
||'''Run the program''' &lt;br /&gt;
||Let's click on  '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
le'ts enter '''5''' for 'a' and click OK&lt;br /&gt;
&lt;br /&gt;
enter '''0''' for 'r' and click OK&lt;br /&gt;
&lt;br /&gt;
Here we get a ''' runtime error''' ,&lt;br /&gt;
&lt;br /&gt;
“'''you tried to divide by zero'''”&lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''Line number 4'''&lt;br /&gt;
||This error is in line number 4.&lt;br /&gt;
|-&lt;br /&gt;
||'''Run time error'''&lt;br /&gt;
||This error occurs as we cannot '''divide''' a number with''' zero'''.&lt;br /&gt;
|-&lt;br /&gt;
||Run the program &lt;br /&gt;
||Let's run the program again. &lt;br /&gt;
&lt;br /&gt;
Enter '''5''' for number and click OK &lt;br /&gt;
&lt;br /&gt;
enter '''2''' for 'r' and click OK &lt;br /&gt;
&lt;br /&gt;
Program without errors.&lt;br /&gt;
|-&lt;br /&gt;
||'''“clear” command'''&lt;br /&gt;
||I will clear the current program from '''KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
Type '''clear''' command and '''Run''' to clean the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||Next we will learn about ''' logical errors'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''Logical errors''' &lt;br /&gt;
&lt;br /&gt;
||'''Logical error''' is a mistake in a program's '''source code''' that results in '''incorrect''' or '''unexpected''' behavior.&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
'''Assigning''' a value to the wrong variable.&lt;br /&gt;
&lt;br /&gt;
'''Multiplying''' two numbers instead of '''adding'''.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=30 &lt;br /&gt;
&lt;br /&gt;
'''message&amp;quot;In while loop, code inside the loop repeats till boolean &lt;br /&gt;
&lt;br /&gt;
'''evaluates false&amp;quot; &lt;br /&gt;
&lt;br /&gt;
'''while $x&amp;gt;20''' { &lt;br /&gt;
&lt;br /&gt;
'''$x=$x+1''' &lt;br /&gt;
&lt;br /&gt;
'''fontsize 15''' &lt;br /&gt;
&lt;br /&gt;
'''forward 20''' &lt;br /&gt;
&lt;br /&gt;
'''print $x''' } &lt;br /&gt;
||I will copy the program from text editor and paste it into '''Kturtle's''' Editor &lt;br /&gt;
&lt;br /&gt;
Pause the tutorial here and type the program into your '''KTurtle''' editor &lt;br /&gt;
&lt;br /&gt;
Resume the tutorial after typing the program. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||'''Run the program''' &lt;br /&gt;
||Now click on the '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
A dialog box pops-up, let's click OK.&lt;br /&gt;
&lt;br /&gt;
Loop goes into an '''infinite loop'''. &lt;br /&gt;
|-&lt;br /&gt;
||Highlight '''“ while”  loop condition'''&lt;br /&gt;
||We see that '''“while”''' loop prints numbers from 31 and it is still printing.&lt;br /&gt;
&lt;br /&gt;
This is a '''logical error'''.&lt;br /&gt;
&lt;br /&gt;
In the “while” condition x is greater than 20,&lt;br /&gt;
&lt;br /&gt;
but the '''variable''' x is always greater than 20&lt;br /&gt;
&lt;br /&gt;
So, the loop never '''terminates.'''&lt;br /&gt;
|-&lt;br /&gt;
||'''Abort the process''' &lt;br /&gt;
||I will click on '''Abort''' button to abort the process. &lt;br /&gt;
|-&lt;br /&gt;
||Change '''$x=$x+1''' to '''$x=$x-1'''&lt;br /&gt;
||Let's change $x=$x+1 to $x=$x-1. &lt;br /&gt;
|-&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=30''' &lt;br /&gt;
&lt;br /&gt;
'''message&amp;quot;In while loop, code inside the loop repeats till boolean &lt;br /&gt;
evaluates false&amp;quot; '''&lt;br /&gt;
&lt;br /&gt;
'''while $x&amp;gt;20 { '''&lt;br /&gt;
&lt;br /&gt;
''''$x=$x-1'''' &lt;br /&gt;
&lt;br /&gt;
'''fontsize 15''' &lt;br /&gt;
&lt;br /&gt;
'''forward 20''' &lt;br /&gt;
&lt;br /&gt;
'''print $x } '''&lt;br /&gt;
|| I will copy the program from text editor and paste it into '''KTurtle's''' editor.&lt;br /&gt;
|- &lt;br /&gt;
||'''Run the program'''&lt;br /&gt;
||Let's click on '''Run''' button to run the program. &lt;br /&gt;
&lt;br /&gt;
A dialog box pop-up let's click OK.&lt;br /&gt;
&lt;br /&gt;
Loop '''terminates''' after printing values from''' 29 to 20.''' &lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
||With this we have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarise.&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 9&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
||In this tutorial we have learnt, errors and types of errors such as&lt;br /&gt;
&lt;br /&gt;
* Use of '''variable''' that has not been declared.&lt;br /&gt;
&lt;br /&gt;
* Missing '''quotes''' in strings.&lt;br /&gt;
&lt;br /&gt;
*''' Runtime errors''' and&lt;br /&gt;
&lt;br /&gt;
* '''Logical errors'''&lt;br /&gt;
|-&lt;br /&gt;
||Slide Number 10&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
||As an assignment I would like you to find errors in the given programs-&lt;br /&gt;
|-&lt;br /&gt;
||'''Assignment 1'''&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=3''' &lt;br /&gt;
&lt;br /&gt;
'''$y=3''' &lt;br /&gt;
&lt;br /&gt;
'''if $x==$y'''&lt;br /&gt;
&lt;br /&gt;
'''print&amp;quot;they are equal&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
'''else''' &lt;br /&gt;
{ &lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;they are not equal&amp;quot;'''} &lt;br /&gt;
|- &lt;br /&gt;
||'''Assignment 2'''&lt;br /&gt;
||'''program to find the nth term and sum of n terms in GP'''&lt;br /&gt;
&lt;br /&gt;
'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''$x=ask &amp;quot;enter value for x and click Ok&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''$y = ask &amp;quot;enter value for y and click''' Ok&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''$g =sqrt ($x*$y)'''&lt;br /&gt;
&lt;br /&gt;
'''print &amp;quot;Geometric mean is =&amp;quot;+'''&lt;br /&gt;
|-&lt;br /&gt;
||'''Assignment 3'''&lt;br /&gt;
||'''reset''' &lt;br /&gt;
&lt;br /&gt;
'''learn sum $x {''' &lt;br /&gt;
&lt;br /&gt;
'''{$r=0''' &lt;br /&gt;
&lt;br /&gt;
'''for $i= 1 to $x{''' &lt;br /&gt;
&lt;br /&gt;
'''return $r}''' &lt;br /&gt;
&lt;br /&gt;
'''}''' &lt;br /&gt;
&lt;br /&gt;
'''print'''  &lt;br /&gt;
|-&lt;br /&gt;
||Slide number 11&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgement'''&lt;br /&gt;
||Watch the video available at this URL&lt;br /&gt;
http://spoken-tutorial.org/What is a Spoken Tutorial &lt;br /&gt;
It summarises the Spoken Tutorial project &lt;br /&gt;
If you do not have good bandwidth, &lt;br /&gt;
you can download and watch it &lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
Slide Number 12&lt;br /&gt;
||The Spoken Tutorial Project Team :&lt;br /&gt;
&lt;br /&gt;
Conducts workshops using spoken tutorials &lt;br /&gt;
Gives certificates to those who pass an online test &lt;br /&gt;
For more details, please write to&lt;br /&gt;
contact@spoken-tutorial.org&lt;br /&gt;
|-&lt;br /&gt;
||Slide number 13 &lt;br /&gt;
||Spoken Tutorial Project is a part  of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
It is supported by the National Mission on Education through ICT, MHRD, Government of India &lt;br /&gt;
More information on this Mission is available at this link&lt;br /&gt;
http://spoken-tutorial.org/NMEICT-Intro ]&lt;br /&gt;
&lt;br /&gt;
This is Madhuri Ganpathi from IIT Bombay signing off.&lt;br /&gt;
Thank you  for joining&lt;br /&gt;
|-&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English</id>
		<title>Java/C2/Array-Operations/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English"/>
				<updated>2013-01-24T13:57:55Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Array Operations&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' array operations, java, sort, fill, copy, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Array Operations '''in java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how to &lt;br /&gt;
&lt;br /&gt;
'''import the class Arrays '''and, &lt;br /&gt;
&lt;br /&gt;
'''perform basic operations on arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 11.10''', &lt;br /&gt;
&lt;br /&gt;
'''JDK 1.6''' and &lt;br /&gt;
&lt;br /&gt;
'''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge on''' arrays in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which is as shown [http://spoken-tutorial.org/ http][http://spoken-tutorial.org/ ://][http://spoken-tutorial.org/ spoken][http://spoken-tutorial.org/ -][http://spoken-tutorial.org/ tutorial][http://spoken-tutorial.org/ .][http://spoken-tutorial.org/ org]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The methods for array operations are available in a '''class '''called '''Arrays'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To access them, we need to import that '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is done by the statement '''import java.util.Arrays;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can access a '''method '''from the '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We do it by adding a '''dot''' and the method name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''Arrays '''''dot '''''toString''' means '''toString''' method from the class '''Arrays.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Point to the code'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
{Eclipse should contain the following code}&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have already created a '''class''' '''ArraysDemo'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now import the '''class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''public class...''', type&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The '''import''' statement is given before the '''class '''definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before '''public class''', type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import '''java.util.Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement says that '''java''' contains a '''package '''called '''util''' which contains the class '''Arrays''' and it has to be imported.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the main function, type&lt;br /&gt;
&lt;br /&gt;
'''int marks&amp;lt;nowiki&amp;gt;[] = {2, 7, 5, 4, 8};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now let us add an '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the '''main '''function,type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int marks '''''open close square brackets''''' '''''equal to within brackets '''''2, 7, 5, 4, 8 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In next line, type&lt;br /&gt;
&lt;br /&gt;
'''String mStr = Arrays.toString(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(mStr);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now we shall use a method available in the '''Arrays''' '''class''' to get a string representation of the array and print it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''String mStr '''''equal to''''' Arrays '''''dot '''''toString '''''within brackets '''''marks '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''toString''' method gives a string representation of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we shall print the marks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, type '''System '''''dot '''''out '''''dot '''''println '''''within brackets''''' mStr '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us run it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''toString''' method has given a string representation of the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at sorting the elements of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''Arrays.toString''', type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight sort.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So before the line '''Arrays '''''dot '''''toString '''''within brackets '''''marks '''type '''Arrays '''''dot '''''sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''sort '''method in the '''Arrays class''', sorts the elements of the array passed to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we are sorting the array and then printing the string form of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''sort''' method has sorted the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the '''sort''' method has changed the array itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This type of sorting is called''' inplace sorting'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It means the array which contains the elements is changed as a result of sorting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''fill'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the line '''Arrays.sort''' and type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.fill(marks, 6);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The fill method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
The first is the array to fill and the second is what should it be filled with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the sorting line and&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''Arrays '''''dot '''''fill '''''within brackets''''' marks, 6;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, as the name goes, the fill method fills the array with the given argument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''copyOf'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the '''Arrays.fill..''' line and type&lt;br /&gt;
&lt;br /&gt;
'''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We are going to copy all the elements of the array '''marks''' into the array '''marksCopy'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''toString(marks)''' to '''toString(marksCopy)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''copyOf''' method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first argument is the array to copy from.&lt;br /&gt;
&lt;br /&gt;
And the second is the no.of elements to copy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the contents of the new array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
We see that the elements of the array '''marks''' have been copied to the array '''marksCopy'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 5)''' to '''copyOf(marks, 3)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us see what happens if we change the no.of elements to be copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Change 5''' to '''3'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now look at the new array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
As we can see, only the first three elements have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see what happens if the no.of elements to be copied is greater than the total no.of elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 3)''' to '''copyOf(marks, 8)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''3''' to '''8'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the extra elements have been set to the default value, which is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we'll see how to copy a range of values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 8)''' to '''copyOfRange(marks, 1, 4)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf '''to''' copyOfRange '''and''' 8''' to '''1, 4'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''copyOfRange(marks, 1, 4)''' copies all the elements starting from index 1 and stopping at index 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the elements from index 1 to index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that we have given 1, 4 in the method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But even, then the element at index 4 has not been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only the elements till index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This behaviour ensures that continuity of ranges is maintained.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(0, 4) implies from index 0 to index 3&lt;br /&gt;
&lt;br /&gt;
(4, 6) implies from index 4 to index 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So it behaves as if (0, 4) + (4, 6) = (0, 6)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt&lt;br /&gt;
&lt;br /&gt;
how to '''import the class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
Perform array operations like '''sort and copy'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Read about the Arrays.equals method and find out what is does.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link, that summarises the project.&lt;br /&gt;
&lt;br /&gt;
If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This tutorial has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This tutorial has been contributed by '''TalentSprint'''. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English</id>
		<title>Java/C2/Array-Operations/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English"/>
				<updated>2013-01-24T13:57:22Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Array Operations&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' array operations, java, sort, fill, copy, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Array Operations '''in java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how to &lt;br /&gt;
&lt;br /&gt;
'''import the class Arrays '''and, &lt;br /&gt;
&lt;br /&gt;
'''perform basic operations on arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 11.10''', &lt;br /&gt;
&lt;br /&gt;
'''JDK 1.6''' and &lt;br /&gt;
&lt;br /&gt;
'''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge on''' arrays in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which is as shown [http://spoken-tutorial.org/ http][http://spoken-tutorial.org/ ://][http://spoken-tutorial.org/ spoken][http://spoken-tutorial.org/ -][http://spoken-tutorial.org/ tutorial][http://spoken-tutorial.org/ .][http://spoken-tutorial.org/ org]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The methods for array operations are available in a '''class '''called '''Arrays'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To access them, we need to import that '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is done by the statement '''import java.util.Arrays;'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can access a '''method '''from the '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We do it by adding a '''dot''' and the method name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''Arrays '''''dot '''''toString''' means '''toString''' method from the class '''Arrays.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Point to the code'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
{Eclipse should contain the following code}&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have already created a '''class''' '''ArraysDemo'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now import the '''class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''public class...''', type&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The '''import''' statement is given before the '''class '''definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before '''public class''', type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import '''java.util.Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement says that '''java''' contains a '''package '''called '''util''' which contains the class '''Arrays''' and it has to be imported.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the main function, type&lt;br /&gt;
&lt;br /&gt;
'''int marks&amp;lt;nowiki&amp;gt;[] = {2, 7, 5, 4, 8};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now let us add an '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the '''main '''function,type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int marks '''''open close square brackets''''' '''''equal to within brackets '''''2, 7, 5, 4, 8 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In next line, type&lt;br /&gt;
&lt;br /&gt;
'''String mStr = Arrays.toString(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(mStr);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now we shall use a method available in the '''Arrays''' '''class''' to get a string representation of the array and print it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''String mStr '''''equal to''''' Arrays '''''dot '''''toString '''''within brackets '''''marks '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''toString''' method gives a string representation of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we shall print the marks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, type '''System '''''dot '''''out '''''dot '''''println '''''within brackets''''' mStr '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us run it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''toString''' method has given a string representation of the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at sorting the elements of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''Arrays.toString''', type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight sort.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So before the line '''Arrays '''''dot '''''toString '''''within brackets '''''marks '''type '''Arrays '''''dot '''''sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''sort '''method in the '''Arrays class''', sorts the elements of the array passed to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we are sorting the array and then printing the string form of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''sort''' method has sorted the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the '''sort''' method has changed the array itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This type of sorting is called''' inplace sorting'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It means the array which contains the elements is changed as a result of sorting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''fill'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the line '''Arrays.sort''' and type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.fill(marks, 6);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The fill method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
The first is the array to fill and the second is what should it be filled with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the sorting line and&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''Arrays '''''dot '''''fill '''''within brackets''''' marks, 6;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, as the name goes, the fill method fills the array with the given argument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''copyOf'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the '''Arrays.fill..''' line and type&lt;br /&gt;
&lt;br /&gt;
'''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We are going to copy all the elements of the array '''marks''' into the array '''marksCopy'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''toString(marks)''' to '''toString(marksCopy)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''copyOf''' method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first argument is the array to copy from.&lt;br /&gt;
&lt;br /&gt;
And the second is the no.of elements to copy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the contents of the new array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
We see that the elements of the array '''marks''' have been copied to the array '''marksCopy'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 5)''' to '''copyOf(marks, 3)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us see what happens if we change the no.of elements to be copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Change 5''' to '''3'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now look at the new array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
As we can see, only the first three elements have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see what happens if the no.of elements to be copied is greater than the total no.of elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 3)''' to '''copyOf(marks, 8)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''3''' to '''8'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the extra elements have been set to the default value, which is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we'll see how to copy a range of values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 8)''' to '''copyOfRange(marks, 1, 4)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf '''to''' copyOfRange '''and''' 8''' to '''1, 4'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''copyOfRange(marks, 1, 4)''' copies all the elements starting from index 1 and stopping at index 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the elements from index 1 to index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that we have given 1, 4 in the method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But even, then the element at index 4 has not been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only the elements till index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This behaviour ensures that continuity of ranges is maintained.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(0, 4) implies from index 0 to index 3&lt;br /&gt;
&lt;br /&gt;
(4, 6) implies from index 4 to index 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So it behaves as if (0, 4) + (4, 6) = (0, 6)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt&lt;br /&gt;
&lt;br /&gt;
how to '''import the class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
Perform array operations like '''sort and copy'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Read about the Arrays.equals method and find out what is does.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link, that summarises the project.&lt;br /&gt;
&lt;br /&gt;
If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This tutorial has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This tutorial has been contributed by '''TalentSprint'''. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English</id>
		<title>Java/C2/Array-Operations/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English"/>
				<updated>2013-01-24T13:56:22Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Array Operations&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' array operations, java, sort, fill, copy, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Array Operations '''in java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how to &lt;br /&gt;
&lt;br /&gt;
'''import the class Arrays '''and, &lt;br /&gt;
&lt;br /&gt;
'''perform basic operations on arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 11.10''', &lt;br /&gt;
&lt;br /&gt;
'''JDK 1.6''' and &lt;br /&gt;
&lt;br /&gt;
'''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge on''' arrays in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which is as shown [http://spoken-tutorial.org/ http][http://spoken-tutorial.org/ ://][http://spoken-tutorial.org/ spoken][http://spoken-tutorial.org/ -][http://spoken-tutorial.org/ tutorial][http://spoken-tutorial.org/ .][http://spoken-tutorial.org/ org]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The methods for array operations are available in a '''class '''called '''Arrays'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To access them, we need to import that '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is done by the statement '''import java.util.Arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can access a '''method '''from the '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We do it by adding a '''dot''' and the method name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''Arrays '''''dot '''''toString''' means '''toString''' method from the class '''Arrays.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Point to the code'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
{Eclipse should contain the following code}&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have already created a '''class''' '''ArraysDemo'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now import the '''class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''public class...''', type&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The '''import''' statement is given before the '''class '''definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before '''public class''', type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import '''java.util.Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement says that '''java''' contains a '''package '''called '''util''' which contains the class '''Arrays''' and it has to be imported.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the main function, type&lt;br /&gt;
&lt;br /&gt;
'''int marks&amp;lt;nowiki&amp;gt;[] = {2, 7, 5, 4, 8};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now let us add an '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the '''main '''function,type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int marks '''''open close square brackets''''' '''''equal to within brackets '''''2, 7, 5, 4, 8 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In next line, type&lt;br /&gt;
&lt;br /&gt;
'''String mStr = Arrays.toString(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(mStr);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now we shall use a method available in the '''Arrays''' '''class''' to get a string representation of the array and print it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''String mStr '''''equal to''''' Arrays '''''dot '''''toString '''''within brackets '''''marks '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''toString''' method gives a string representation of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we shall print the marks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, type '''System '''''dot '''''out '''''dot '''''println '''''within brackets''''' mStr '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us run it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''toString''' method has given a string representation of the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at sorting the elements of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''Arrays.toString''', type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight sort.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So before the line '''Arrays '''''dot '''''toString '''''within brackets '''''marks '''type '''Arrays '''''dot '''''sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''sort '''method in the '''Arrays class''', sorts the elements of the array passed to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we are sorting the array and then printing the string form of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''sort''' method has sorted the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the '''sort''' method has changed the array itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This type of sorting is called''' inplace sorting'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It means the array which contains the elements is changed as a result of sorting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''fill'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the line '''Arrays.sort''' and type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.fill(marks, 6);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The fill method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
The first is the array to fill and the second is what should it be filled with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the sorting line and&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''Arrays '''''dot '''''fill '''''within brackets''''' marks, 6;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, as the name goes, the fill method fills the array with the given argument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''copyOf'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the '''Arrays.fill..''' line and type&lt;br /&gt;
&lt;br /&gt;
'''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We are going to copy all the elements of the array '''marks''' into the array '''marksCopy'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''toString(marks)''' to '''toString(marksCopy)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''copyOf''' method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first argument is the array to copy from.&lt;br /&gt;
&lt;br /&gt;
And the second is the no.of elements to copy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the contents of the new array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
We see that the elements of the array '''marks''' have been copied to the array '''marksCopy'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 5)''' to '''copyOf(marks, 3)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us see what happens if we change the no.of elements to be copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Change 5''' to '''3'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now look at the new array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
As we can see, only the first three elements have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see what happens if the no.of elements to be copied is greater than the total no.of elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 3)''' to '''copyOf(marks, 8)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''3''' to '''8'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the extra elements have been set to the default value, which is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we'll see how to copy a range of values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 8)''' to '''copyOfRange(marks, 1, 4)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf '''to''' copyOfRange '''and''' 8''' to '''1, 4'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''copyOfRange(marks, 1, 4)''' copies all the elements starting from index 1 and stopping at index 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the elements from index 1 to index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that we have given 1, 4 in the method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But even, then the element at index 4 has not been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only the elements till index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This behaviour ensures that continuity of ranges is maintained.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(0, 4) implies from index 0 to index 3&lt;br /&gt;
&lt;br /&gt;
(4, 6) implies from index 4 to index 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So it behaves as if (0, 4) + (4, 6) = (0, 6)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt&lt;br /&gt;
&lt;br /&gt;
how to '''import the class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
Perform array operations like '''sort and copy'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Read about the Arrays.equals method and find out what is does.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link, that summarises the project.&lt;br /&gt;
&lt;br /&gt;
If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This tutorial has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This tutorial has been contributed by '''TalentSprint'''. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/For-Loop/English</id>
		<title>Java/C2/For-Loop/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/For-Loop/English"/>
				<updated>2013-01-24T13:49:28Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': for loop in Java&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' conditions, loops, for loop, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''for loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how to use the '''for loop in Java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10''', &lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge on '''relational operators ''' and '''if statement''' in Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, please go through the tutorials on these topics available at our website [http://spoken-tuitorial.org/ http][http://spoken-tuitorial.org/ ://][http://spoken-tuitorial.org/ spoken][http://spoken-tuitorial.org/ -][http://spoken-tuitorial.org/ tutorial][http://spoken-tuitorial.org/ .][http://spoken-tuitorial.org/ org][http://spoken-tuitorial.org/ .]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''Syntax'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here is the syntax of the '''for loop'''.&lt;br /&gt;
It consisits of initializastion, loop condition and incriment.&lt;br /&gt;
Then it has the for block which keeps on executing till the loop condition is true.&lt;br /&gt;
&lt;br /&gt;
Now, let us try out an example in '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class ForLoopDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have the skeleton required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have a '''class''' named '''ForLoopDemo'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us add the '''for loop''' inside the '''main method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the main function, type&lt;br /&gt;
&lt;br /&gt;
'''int i&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for (i = 0; i&amp;lt;nowiki&amp;gt; &amp;lt; 10; &amp;lt;/nowiki&amp;gt;i = i + 1)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight''' '''when you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the main function, type '''int i '''''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then type '''for '''''within brackets'' '''i '''''equal to''''' 0 '''''semicolon'' '''i '''''less than '''''10''' ''semicolon''''' i '''''equal to'' '''i '''''plus '''''1'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement decides how the loop is going to progress.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight i = 0&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This is the starting condition for the loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This condition allows the variable to be initialized.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight i&amp;lt;nowiki&amp;gt; &amp;lt; 10&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This is the loop running condition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the condition is true then the for block will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Else it will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That means when i becomes more than or equal to 10, the block is not executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight i = i + 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This states how the loop variable is going to change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, the value of i starts with 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It keeps increasing by 1 for every iteration of the loop until it becomes 10.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us do something with i.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change for (i = 0; i&amp;lt;nowiki&amp;gt; &amp;lt; 10; &amp;lt;/nowiki&amp;gt;i = i + 1) to for (i = 0; i&amp;lt;nowiki&amp;gt; &amp;lt; 10; &amp;lt;/nowiki&amp;gt;i = i + 1) {&lt;br /&gt;
&lt;br /&gt;
System.out.println( i * i );&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the println statement and explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, open and close curly brackets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next line type '''System''' ''dot''''' out '''''dot '''''println''' within brackets '''i''' ''into'' '''i'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will print the square of each number from 0 to 9.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''save''' and '''run''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the loop ran over numbers from 0 to 9.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The square of the number has been printed in each iteration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us print all the 2 digit numbers that are multiples of 3 or 5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''i = 0''' to '''i = 10'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, '''i '''should have values from 10 to 99.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So change''' i''' ''equal to'' '''0''' to '''i '''''equal to '''''10'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''i&amp;lt;nowiki&amp;gt; &amp;lt; 10&amp;lt;/nowiki&amp;gt;''' to '''i&amp;lt;nowiki&amp;gt; &amp;lt; 100&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''i '''''less than'' '''10''' to '''i '''''less than'' '''100'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''System.out.println( i * i )''' to &lt;br /&gt;
&lt;br /&gt;
'''if ((i % 3 == 0) || (i % 5 == 0)){'''&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(i);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Delete '''System''' ''dot'' '''out''' ''dot'' '''println '''within brackets '''i''' ''into'' '''i'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We print the number only if it is a multiple of 3 or 5.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type,&lt;br /&gt;
&lt;br /&gt;
'''if '''within brackets '''i''' ''mod'' '''3''' ''double equal to'' '''0 '''or''' i '''''mod'' '''5 '''''double equal to '''''0'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement checks whether '''i '''is divisible by '''3 '''or by '''5'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, next line type '''System''' ''dot'' '''out '''''dot'' '''println''' within brackets '''i'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us see the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Highlight the output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that the numbers are either multiples of 3 or of 5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use for loop in java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A three digit number is called Armstrong Number if it is equal to the sum of cubes of its digits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, 153 is equal to 1 cube plus 5 cube plus 3 cube.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Find all such 3 digit numbers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link, that summarises the project.Alternatively, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This script has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This script has been contributed by '''TalentSprint'''. &lt;br /&gt;
&lt;br /&gt;
This is Prathamesh Salunke signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English</id>
		<title>Java/C2/Introduction-to-Array/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English"/>
				<updated>2013-01-23T13:57:16Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Introduction to Arrays&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' arrays, java, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Introduction to Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how&lt;br /&gt;
&lt;br /&gt;
* to '''create arrays''' and&lt;br /&gt;
* access elements in '''arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10'''&lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge of '''data types''' and '''for loop in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5 and 6&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight index column as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Arrays are a collection of data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, a list of marks, a list of names, a list of temperatures or as shown on the slide, a list of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each item has an index based on its position. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The index of the first element is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second element has index 1 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now see how to store this data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So switch to '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''class''' named '''ArraysDemo '''has already been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Within the main method, let us add the rainfall data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
'''int rainfall&amp;lt;nowiki&amp;gt;[] = {25, 31, 29, 13, 27, 35, 12};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int rainfall '''''open close square brackets equal to''''' '''''within curly brackets''''' 25, 31, 29, 13, 27, 35, 12 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the square braces after the '''variable '''name''' rainfall'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This declares '''rainfall''' as an '''array''' of '''integers'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The braces are used to specify the elements of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us access data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(rainfall&amp;lt;nowiki&amp;gt;[2]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next line, type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System '''''dot '''''out '''''dot'' '''println '''within brackets''' rainfall '''then within square brackets 2 semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are printing the element with index 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, the third element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now run the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the ouput&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the output is the third value, '''29'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us try a different index.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''rainfall&amp;lt;nowiki&amp;gt;[2]&amp;lt;/nowiki&amp;gt;''' to '''rainfall&amp;lt;nowiki&amp;gt;[0]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''2''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the output is the first value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us modify a value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the '''Syste...''' line, type&lt;br /&gt;
&lt;br /&gt;
'''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall change the value of the first item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see its value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value has been changed to 11.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now what if we only know the size of the array and do not know the values.&lt;br /&gt;
Let us see how to create such array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove everything in main function and type&lt;br /&gt;
'''int squares&amp;lt;nowiki&amp;gt;[] = &amp;lt;/nowiki&amp;gt;new int&amp;lt;nowiki&amp;gt;[10];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
This statement creates an array of integers having 10 elements. The name of the array is '''squares'''.&lt;br /&gt;
Now let us add some values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have entered the squares of first four numbers. Now what about the other elements of the array. Let us see what they contain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall print the sixth value in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see that the value is zero. This is because when we create an array of integers, all the values are initialized to 0. Similarly an array of floats will have all its values initialized to 0.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would be a long process if we have to type each value into the array. Instead, let us use a for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| After the '''squares&amp;lt;nowiki&amp;gt;[3]&amp;lt;/nowiki&amp;gt;''' line, type&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4; x&amp;lt;nowiki&amp;gt; &amp;lt; 10; &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4; x&amp;lt;nowiki&amp;gt; &amp;lt; 10;&amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n;'''&lt;br /&gt;
&lt;br /&gt;
'''} '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We iterate over numbers from 4 to 9 and set the corresponding element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the sixth element now is the square of 6, which is 36.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In fact now we can set all the values inside the for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove all the lines from&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0]... &amp;lt;/nowiki&amp;gt;'''to '''squares&amp;lt;nowiki&amp;gt;[3]...&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''x = 4''' to '''x = 0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''println(squares&amp;lt;nowiki&amp;gt;[5])&amp;lt;/nowiki&amp;gt;''' to&lt;br /&gt;
&lt;br /&gt;
'''println(squares&amp;lt;nowiki&amp;gt;[2])&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the lines that set the values manually and change '''4''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This way all the elements from index 0 to index 9 are set to the corresponding squares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall now see the value of the third element.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change '''5 '''to '''2'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value of third element has been set in the loop and it is 9.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This way, arrays can be created and used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 7&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use for loop in java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given an array of integers, find the sum of all the elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link. It summarises the project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 12'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This script has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This script has been contributed by '''TalentSprint'''. &lt;br /&gt;
&lt;br /&gt;
This is Prathamesh Salunke signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English</id>
		<title>Java/C2/Array-Operations/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English"/>
				<updated>2013-01-23T13:44:42Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Array Operations&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' array operations, java, sort, fill, copy, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Array Operations '''in java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how to &lt;br /&gt;
&lt;br /&gt;
'''import the class Arrays '''and, &lt;br /&gt;
&lt;br /&gt;
'''perform basic operations on arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 11.10''', &lt;br /&gt;
&lt;br /&gt;
'''JDK 1.6''' and &lt;br /&gt;
&lt;br /&gt;
'''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge on''' arrays in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which is as shown [http://spoken-tutorial.org/ http][http://spoken-tutorial.org/ ://][http://spoken-tutorial.org/ spoken][http://spoken-tutorial.org/ -][http://spoken-tutorial.org/ tutorial][http://spoken-tutorial.org/ .][http://spoken-tutorial.org/ org]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The methods for array operations are available in a '''class '''called '''Arrays'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To access them, we need to import that '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is done by the statement '''import java.util.Arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can access a '''method '''from the '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We do it by adding a '''dot''' and the method name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''Arrays '''''dot '''''toString''' means '''toString''' method from the class '''Arrays.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Point to the code'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
{Eclipse should contain the following code}&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have already created a '''class''' '''ArraysDemo'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now import the '''class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''public class...''', type&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The '''import''' statement is given before the '''class '''definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before '''public class''', type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import '''java.util.Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement says that '''java''' contains a '''package '''called '''util''' which contains the class '''Arrays''' and it has to be imported.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the main function, type&lt;br /&gt;
&lt;br /&gt;
'''int marks&amp;lt;nowiki&amp;gt;[] = {2, 7, 5, 4, 8};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now let us add an '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the '''main '''function,type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int marks '''''open close square brackets''''' '''''equal to within brackets '''''2, 7, 5, 4, 8 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In next line, type&lt;br /&gt;
&lt;br /&gt;
'''String mStr = Arrays.toString(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(mStr);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now we shall use a method available in the '''Arrays''' '''class''' to get a string representation of the array and print it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''String mStr '''''equal to''''' Arrays '''''dot '''''toString '''''within brackets '''''marks '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''toString''' method gives a string representation of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we shall print the marks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, type '''System '''''dot '''''out '''''dot '''''println '''''within brackets''''' mStr '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us run it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''toString''' method has given a string representation of the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at sorting the elements of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''Arrays.toString''', type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight sort.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So before the line '''Arrays '''''dot '''''toString '''''within brackets '''''marks '''type '''Arrays '''''dot '''''sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''sort '''method in the '''Arrays class''', sorts the elements of the array passed to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we are sorting the array and then printing the string form of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''sort''' method has sorted the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the '''sort''' method has changed the array itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This type of sorting is called''' inplace sorting'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It means the array which contains the elements is changed as a result of sorting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''fill'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the line '''Arrays.sort''' and type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.fill(marks, 6);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The fill method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
The first is the array to fill and the second is what should it be filled with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the sorting line and&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''Arrays '''''dot '''''fill '''''within brackets''''' marks, 6;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, as the name goes, the fill method fills the array with the given argument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''copyOf'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the '''Arrays.fill..''' line and type&lt;br /&gt;
&lt;br /&gt;
'''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We are going to copy all the elements of the array '''marks''' into the array '''marksCopy'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''toString(marks)''' to '''toString(marksCopy)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''copyOf''' method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first argument is the array to copy from.&lt;br /&gt;
&lt;br /&gt;
And the second is the no.of elements to copy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the contents of the new array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
We see that the elements of the array '''marks''' have been copied to the array '''marksCopy'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 5)''' to '''copyOf(marks, 3)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us see what happens if we change the no.of elements to be copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Change 5''' to '''3'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now look at the new array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
As we can see, only the first three elements have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see what happens if the no.of elements to be copied is greater than the total no.of elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 3)''' to '''copyOf(marks, 8)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''3''' to '''8'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the extra elements have been set to the default value, which is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we'll see how to copy a range of values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 8)''' to '''copyOfRange(marks, 1, 4)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf '''to''' copyOfRange '''and''' 8''' to '''1, 4'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''copyOfRange(marks, 1, 4)''' copies all the elements starting from index 1 and stopping at index 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the elements from index 1 to index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that we have given 1, 4 in the method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But even, then the element at index 4 has not been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only the elements till index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This behaviour ensures that continuity of ranges is maintained.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(0, 4) implies from index 0 to index 3&lt;br /&gt;
&lt;br /&gt;
(4, 6) implies from index 4 to index 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So it behaves as if (0, 4) + (4, 6) = (0, 6)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt&lt;br /&gt;
&lt;br /&gt;
how to '''import the class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
Perform array operations like '''sort and copy'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Read about the Arrays.equals method and find out what is does.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link, that summarises the project.&lt;br /&gt;
&lt;br /&gt;
If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This tutorial has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This tutorial has been contributed by '''TalentSprint'''. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/do-while/English</id>
		<title>Java/C2/do-while/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/do-while/English"/>
				<updated>2013-01-23T13:11:58Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': do-while Loop&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' loop, conditions, do-while loop, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Welcome to the spoken tutorial on''' do-while Loop '''in java'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| In this tutorial, you will learn about&lt;br /&gt;
&lt;br /&gt;
* '''the do-while loop and'''&lt;br /&gt;
* '''how to use it'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 11.10''',&lt;br /&gt;
&lt;br /&gt;
'''JDK 1.6''' and &lt;br /&gt;
&lt;br /&gt;
'''Eclipse 3.7'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| To follow this tutorial, you should have knowledge on''' while loop in java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website as shown.&lt;br /&gt;
&lt;br /&gt;
[http://spoken-tutorial.org/ http][http://spoken-tutorial.org/ ://][http://spoken-tutorial.org/ spoken][http://spoken-tutorial.org/ -][http://spoken-tutorial.org/ tutorial][http://spoken-tutorial.org/ .][http://spoken-tutorial.org/ org]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
Point on slide&lt;br /&gt;
&lt;br /&gt;
'''do-while loop'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Here is the structure of a do-while loop. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that it is similar to a while loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has two parts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First is the loop condition. And the second is the loop variable&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| The only difference is that the condition is written after the '''do''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And so the condition is checked after the execution of the statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see an example.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Point to the code'''&lt;br /&gt;
&lt;br /&gt;
Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public class DoWhileDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| We have Eclipse IDE and the skeleton required for the rest of the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have created a class '''DoWhileDemo''' and added the main method to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| In the main method and type,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n = 1;'''&lt;br /&gt;
&lt;br /&gt;
'''do {'''&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(n);'''&lt;br /&gt;
&lt;br /&gt;
'''n = n + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''} while(n&amp;lt;nowiki&amp;gt; &amp;lt;= 10);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We are going to print the numbers from 1 to 10 using a do-while loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n ''equalto'' 1 ''semicolon'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n is going to be our loop variable.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''do '''&lt;br /&gt;
&lt;br /&gt;
'''open curly braces and close'''&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(n);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall print the value of n and then increment it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''n ''equalto'' n ''plus'' 1;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| And we do this as long as &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''n''''' is less than or equal to '''''10'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''while(n ''less than equalto'' 10)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Add a ''semi-colon'' '''to complete the do-while statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Save and Run. Point to output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us see the code in action.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save. Run.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We see that, the numbers from 1 to 10 are printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us now understand how the code is executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Navigate through the code'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight print statement.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight condition statement'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| First, the value 1 is printed and n becomes 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And then, the condition is checked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
since it is true, 2 is printed and n becomes 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And so on till all the 10 numbers are printed and the value of n becomes 11.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When n = 11, the condition fails and the loop stops.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us now print numbers from 50 to 40 in decreasing order.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Change n = 1 to n = 50&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| So we start with 50.&lt;br /&gt;
&lt;br /&gt;
Change n = 1 to n = 50.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Change '''n = n + 1''' to '''n = n - 1'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Since we are looping from a bigger number to a smaller number, we decrement the loop variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''n = n + 1''' to '''n = n - 1'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Change the '''n&amp;lt;nowiki&amp;gt; &amp;lt;= 10&amp;lt;/nowiki&amp;gt;''' to '''n &amp;gt;= 40'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We loop as long as n is greater than or equal to 40.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change the condition to n &amp;gt;= 40&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Save and Run.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us look at the output.&lt;br /&gt;
&lt;br /&gt;
Save and Run.&lt;br /&gt;
&lt;br /&gt;
As we can see, the numbers from 50 to 40 are printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now let us try a different logic using the do-while loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Given a number, we shall find out if it is a perfect square or not.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Inside the main method, type&lt;br /&gt;
&lt;br /&gt;
'''int n = 25;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Clear the main method.&lt;br /&gt;
&lt;br /&gt;
Type&lt;br /&gt;
&lt;br /&gt;
Inside the main method, type&lt;br /&gt;
&lt;br /&gt;
'''int n = 25;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We shall see if the value in n is a perfect square or not.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''int x = 0;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''int x = 0;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall use x to store the square root if the number is a perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''do {'''&lt;br /&gt;
&lt;br /&gt;
'''x = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type '''do'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open close braces.&lt;br /&gt;
&lt;br /&gt;
'''x '''''equal to '''''x '''''plus''''' 1'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''do {'''&lt;br /&gt;
&lt;br /&gt;
'''x = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''} while(x * x&amp;lt;nowiki&amp;gt; &amp;lt; &amp;lt;/nowiki&amp;gt;n);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Then,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''while(x ''into (star)'' x&amp;lt;nowiki&amp;gt; &amp;lt; &amp;lt;/nowiki&amp;gt;n)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Close with a semi-colon&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Point to the condition then increment statement.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| As long a '''x '''''into '''''x '''is less than '''n''', we keep incrementing the value of x.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| So when the loop stops, the reverse of this condition will be true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Which means either x into x must be equal to n.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or x into x must be greater than n.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| If '''x '''''into '''''x''' is equal to '''n''', the number is a perfect square.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is not equal to n, the number is not a perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| So finally, we print the condition.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(x * x == n);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''System.out.println(x * x == n);'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us see the code in action.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Save''' and '''Run'''. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| As we can see, the output is '''true'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us with another perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Change n = 25 to n = 49'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''n = 49;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Save and Run&lt;br /&gt;
&lt;br /&gt;
We again get a true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us try with a number which is not a perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Change '''n = 49''' to '''n = 23'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and Run. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Change 49 to 23.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We get a false.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see what happens when the value of '''n''' is 0.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Change n = 23 to n = 0&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Since 0 is not a natural number, we must get a false.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us run the code.&lt;br /&gt;
&lt;br /&gt;
Save. Run.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We see that we get false as expected.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This happens because even before the condition&lt;br /&gt;
&lt;br /&gt;
'''x''' ''into''''' x''' ''is less than '''''n '''is checked, the value of x is incremented and it becomes 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The loop condition fails and loop does not run.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| That way, by using a do-while loop, we make sure that 0 is not considered as a perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This way, a do-while loop is used for solving a range of problems.&lt;br /&gt;
&lt;br /&gt;
Specially, when the loop must run at least once.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| This brings us to the end of the tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we learnt about the &lt;br /&gt;
&lt;br /&gt;
do-while loop and how to use it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| As an assignment for this tutorial, solve the following problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given a binary number, find out its decimal equivalent. Example: '''11010 =&amp;gt; 26'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarizes the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link. It summarizes the project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This tutorial has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| This tutorial has been contributed by '''TalentSprint'''. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/For-Loop/English</id>
		<title>Java/C2/For-Loop/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/For-Loop/English"/>
				<updated>2013-01-23T12:54:41Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': for loop in Java&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' conditions, loops, for loop, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''for loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how to use the '''for loop in Java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10''', &lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge on '''relational operators ''' and '''if statement''' in Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, please go through the tutorials on these topics available at our website [http://spoken-tuitorial.org/ http][http://spoken-tuitorial.org/ ://][http://spoken-tuitorial.org/ spoken][http://spoken-tuitorial.org/ -][http://spoken-tuitorial.org/ tutorial][http://spoken-tuitorial.org/ .][http://spoken-tuitorial.org/ org][http://spoken-tuitorial.org/ .]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''Syntax'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Here is the syntax of the '''for loop'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us try out an example in '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class ForLoopDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have the skeleton required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have a '''class''' named '''ForLoopDemo'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us add the '''for loop''' inside the '''main method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the main function, type&lt;br /&gt;
&lt;br /&gt;
'''int i&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for (i = 0; i&amp;lt;nowiki&amp;gt; &amp;lt; 10; &amp;lt;/nowiki&amp;gt;i = i + 1)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight''' '''when you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the main function, type '''int i '''''semicolon''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then type '''for '''''within brackets'' '''i '''''equal to''''' 0 '''''semicolon'' '''i '''''less than '''''10''' ''semicolon''''' i '''''equal to'' '''i '''''plus '''''1'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement decides how the loop is going to progress.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Highlight i = 0&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This is the starting condition for the loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This condition allows the variable to be initialized.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight i&amp;lt;nowiki&amp;gt; &amp;lt; 10&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This is the loop running condition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the condition is true then the for block will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Else it will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That means when i becomes more than or equal to 10, the block is not executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight i = i + 1&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This states how the loop variable is going to change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, the value of i starts with 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It keeps increasing by 1 for every iteration of the loop until it becomes 10.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us do something with i.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change for (i = 0; i&amp;lt;nowiki&amp;gt; &amp;lt; 10; &amp;lt;/nowiki&amp;gt;i = i + 1) to for (i = 0; i&amp;lt;nowiki&amp;gt; &amp;lt; 10; &amp;lt;/nowiki&amp;gt;i = i + 1) {&lt;br /&gt;
&lt;br /&gt;
System.out.println( i * i );&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the println statement and explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now, open and close curly brackets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next line type '''System''' ''dot''''' out '''''dot '''''println''' within brackets '''i''' ''into'' '''i'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will print the square of each number from 0 to 9.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''save''' and '''run''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the loop ran over numbers from 0 to 9.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The square of the number has been printed in each iteration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us print all the 2 digit numbers that are multiples of 3 or 5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''i = 0''' to '''i = 10'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So, '''i '''should have values from 10 to 99.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So change''' i''' ''equal to'' '''0''' to '''i '''''equal to '''''10'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''i&amp;lt;nowiki&amp;gt; &amp;lt; 10&amp;lt;/nowiki&amp;gt;''' to '''i&amp;lt;nowiki&amp;gt; &amp;lt; 100&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''i '''''less than'' '''10''' to '''i '''''less than'' '''100'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''System.out.println( i * i )''' to &lt;br /&gt;
&lt;br /&gt;
'''if ((i % 3 == 0) || (i % 5 == 0)){'''&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(i);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Delete '''System''' ''dot'' '''out''' ''dot'' '''println '''within brackets '''i''' ''into'' '''i'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We print the number only if it is a multiple of 3 or 5.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type,&lt;br /&gt;
&lt;br /&gt;
'''if '''within brackets '''i''' ''mod'' '''3''' ''double equal to'' '''0 '''or''' i '''''mod'' '''5 '''''double equal to '''''0'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement checks whether '''i '''is divisible by '''3 '''or by '''5'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, next line type '''System''' ''dot'' '''out '''''dot'' '''println''' within brackets '''i'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us see the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Highlight the output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We can see that the numbers are either multiples of 3 or of 5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use for loop in java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A three digit number is called Armstrong Number if it is equal to the sum of cubes of its digits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, 153 is equal to 1 cube plus 5 cube plus 3 cube.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Find all such 3 digit numbers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link, that summarises the project.Alternatively, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This script has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This script has been contributed by '''TalentSprint'''. &lt;br /&gt;
&lt;br /&gt;
This is Prathamesh Salunke signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English</id>
		<title>Java/C2/Array-Operations/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Array-Operations/English"/>
				<updated>2013-01-23T08:54:22Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Array Operations&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' array operations, java, sort, fill, copy, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Array Operations '''in java.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how to &lt;br /&gt;
&lt;br /&gt;
'''import the class Arrays '''and, &lt;br /&gt;
&lt;br /&gt;
'''perform basic operations on arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 11.10''', &lt;br /&gt;
&lt;br /&gt;
'''JDK 1.6''' and &lt;br /&gt;
&lt;br /&gt;
'''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge on''' arrays in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which is as shown [http://spoken-tutorial.org/ http][http://spoken-tutorial.org/ ://][http://spoken-tutorial.org/ spoken][http://spoken-tutorial.org/ -][http://spoken-tutorial.org/ tutorial][http://spoken-tutorial.org/ .][http://spoken-tutorial.org/ org]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The methods for array operations are available in a '''class '''called '''Arrays'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To access them, we need to import that '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is done by the statement '''import java.util.Arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can access a '''method '''from the '''class'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We do it by adding a '''dot''' and the method name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''Arrays '''''dot '''''toString''' means '''toString''' method from the class '''Arrays.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Point to the code'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
{Eclipse should contain the following code}&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Switch to eclipse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have already created a '''class''' '''ArraysDemo'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now import the '''class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''public class...''', type&lt;br /&gt;
&lt;br /&gt;
'''import java.util.Arrays&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The '''import''' statement is given before the '''class '''definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before '''public class''', type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import '''java.util.Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement says that '''java''' contains a '''package '''called '''util''' which contains the class '''Arrays''' and it has to be imported.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside the main function, type&lt;br /&gt;
&lt;br /&gt;
'''int marks&amp;lt;nowiki&amp;gt;[] = {2, 7, 5, 4, 8};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now let us add an '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the '''main '''function,type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int marks '''''open close square brackets''''' '''''equal to within brackets '''''2, 7, 5, 4, 8 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In next line, type&lt;br /&gt;
&lt;br /&gt;
'''String mStr = Arrays.toString(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(mStr);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now we shall use a method available in the '''Arrays''' '''class''' to get a string representation of the array and print it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''String mStr '''''equal to''''' Arrays '''''dot '''''toString '''''within brackets '''''marks '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''toString''' method gives a string representation of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we shall print the marks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, type '''System '''''dot '''''out '''''dot '''''println '''''within brackets''''' mStr '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us run it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''toString''' method has given a string representation of the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at sorting the elements of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the line '''Arrays.toString''', type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight sort.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| So before the line '''Arrays '''''dot '''''toString '''''within brackets '''''marks '''type '''Arrays '''''dot '''''sort(marks);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''sort '''method in the '''Arrays class''', sorts the elements of the array passed to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we are sorting the array and then printing the string form of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the '''sort''' method has sorted the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the '''sort''' method has changed the array itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This type of sorting is called''' inplace sorting'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It means the array which contains the elements is changed as a result of sorting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''fill'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the line '''Arrays.sort''' and type&lt;br /&gt;
&lt;br /&gt;
'''Arrays.fill(marks, 6);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The fill method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
The first is the array to fill and the second is what should it be filled with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the sorting line and&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''Arrays '''''dot '''''fill '''''within brackets''''' marks, 6.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, as the name goes, the fill method fills the array with the given argument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next method we are going to look at, is '''copyOf'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the '''Arrays.fill..''' line and type&lt;br /&gt;
&lt;br /&gt;
'''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We are going to copy all the elements of the array '''marks''' into the array '''marksCopy'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''int marksCopy&amp;lt;nowiki&amp;gt;[];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''toString(marks)''' to '''toString(marksCopy)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Type '''marksCopy = copyOf(marks, 5);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''copyOf''' method takes two arguments. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first argument is the array to copy from.&lt;br /&gt;
&lt;br /&gt;
And the second is the no.of elements to copy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the contents of the new array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
We see that the elements of the array '''marks''' have been copied to the array '''marksCopy'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 5)''' to '''copyOf(marks, 3)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Let us see what happens if we change the no.of elements to be copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Change 5''' to '''3'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now look at the new array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
As we can see, only the first three elements have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see what happens if the no.of elements to be copied is greater than the total no.of elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 3)''' to '''copyOf(marks, 8)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''3''' to '''8'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the extra elements have been set to the default value, which is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we'll see how to copy a range of values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf(marks, 8)''' to '''copyOfRange(marks, 1, 4)'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''copyOf '''to''' copyOfRange '''and''' 8''' to '''1, 4'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''copyOfRange(marks, 1, 4)''' copies all the elements starting from index 1 and stopping at index 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and Run the program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the elements from index 1 to index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that we have given 1, 4 in the method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But even, then the element at index 4 has not been copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only the elements till index 3 have been copied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This behaviour ensures that continuity of ranges is maintained.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(0, 4) implies from index 0 to index 3&lt;br /&gt;
&lt;br /&gt;
(4, 6) implies from index 4 to index 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So it behaves as if (0, 4) + (4, 6) = (0, 6)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt&lt;br /&gt;
&lt;br /&gt;
how to '''import the class Arrays'''.&lt;br /&gt;
&lt;br /&gt;
Perform array operations like '''sort and copy'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Read about the Arrays.equals method and find out what is does.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link, that summarises the project.&lt;br /&gt;
&lt;br /&gt;
If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This tutorial has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This tutorial has been contributed by '''TalentSprint'''. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/do-while/English</id>
		<title>Java/C2/do-while/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/do-while/English"/>
				<updated>2013-01-22T13:01:19Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: Created page with ''''Title of script''': do-while Loop  '''Author''': TalentSprint  '''Keywords:''' loop, conditions, do-while loop, video tutorial    {| style=&amp;quot;border-spacing:0;&amp;quot; | style=&amp;quot;border:…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': do-while Loop&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' loop, conditions, do-while loop, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Welcome to the spoken tutorial on''' do-while Loop '''in java'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| In this tutorial, you will learn about&lt;br /&gt;
&lt;br /&gt;
* '''the do-while loop and'''&lt;br /&gt;
* '''how to use it'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 11.10''',&lt;br /&gt;
&lt;br /&gt;
'''JDK 1.6''' and &lt;br /&gt;
&lt;br /&gt;
'''Eclipse 3.7'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| To follow this tutorial, you should have knowledge on''' while loop in java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website as shown.&lt;br /&gt;
&lt;br /&gt;
[http://spoken-tutorial.org/ http][http://spoken-tutorial.org/ ://][http://spoken-tutorial.org/ spoken][http://spoken-tutorial.org/ -][http://spoken-tutorial.org/ tutorial][http://spoken-tutorial.org/ .][http://spoken-tutorial.org/ org]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
Point on slide&lt;br /&gt;
&lt;br /&gt;
'''do-while loop'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Here is the structure of a do-while loop. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that it is similar to a while loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has two parts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First is the loop condition. And the second is the loop variable&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| The only difference is that the condition is written after the '''do''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And so the condition is checked after the execution of the statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see an example.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Point to the code'''&lt;br /&gt;
&lt;br /&gt;
Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''public class DoWhileDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| We have Eclipse IDE and the skeleton required for the rest of the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have created a class '''DoWhileDemo''' and added the main method to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| In the main method and type,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n = 1;'''&lt;br /&gt;
&lt;br /&gt;
'''do {'''&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(n);'''&lt;br /&gt;
&lt;br /&gt;
'''n = n + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''} while(n&amp;lt;nowiki&amp;gt; &amp;lt;= 10);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We are going to print the numbers from 1 to 10 using a do-while loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n ''equalto'' 1 ''semicolon'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n is going to be our loop variable.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''do '''&lt;br /&gt;
&lt;br /&gt;
'''open curly braces and close'''&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(n);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall print the value of n and then increment it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''n ''equalto'' n ''plus'' 1;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| And we do this as long as &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''n''''' is less than or equal to '''''10'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''while(n ''less than equalto'' 10)'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Add a ''semi-colon'' '''to complete the do-while statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Save and Run. Point to output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us see the code in action.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save. Run.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We see that, the numbers from 1 to 10 are printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us now understand how the code is executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Navigate through the code'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight print statement.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Highlight condition statement'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| First, the value 1 is printed and n becomes 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And then, the condition is checked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
since it is true, 2 is printed and n becomes 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And so on till all the 10 numbers are printed and the value of n becomes 11.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When n = 11, the condition fails and the loop stops.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us now print numbers from 50 to 40 in decreasing order.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Change n = 1 to n = 50&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| So we start with 50.&lt;br /&gt;
&lt;br /&gt;
Change n = 1 to n = 50.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Change '''n = n + 1''' to '''n = n - 1'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Since we are looping from a bigger number to a smaller number, we decrement the loop variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''n = n + 1''' to '''n = n - 1'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Change the '''n&amp;lt;nowiki&amp;gt; &amp;lt;= 10&amp;lt;/nowiki&amp;gt;''' to '''n &amp;gt;= 40'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We loop as long as n is greater than or equal to 40.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change the condition to n &amp;gt;= 40&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Save and Run.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us look at the output.&lt;br /&gt;
&lt;br /&gt;
Save and Run.&lt;br /&gt;
&lt;br /&gt;
As we can see, the numbers from 50 to 40 are printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now let us try a different logic using the do-while loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Given a number, we shall find out if it is a perfect square or not.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Inside the main method, type&lt;br /&gt;
&lt;br /&gt;
'''int n = 25;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Clear the main method.&lt;br /&gt;
&lt;br /&gt;
Type&lt;br /&gt;
&lt;br /&gt;
Inside the main method, type&lt;br /&gt;
&lt;br /&gt;
'''int n = 25;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We shall see if the value in n is a perfect square or not.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''int x = 0;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''int x = 0;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall use x to store the square root if the number is a perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''do {'''&lt;br /&gt;
&lt;br /&gt;
'''x = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type '''do'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open close braces.&lt;br /&gt;
&lt;br /&gt;
'''x '''''equal to '''''x '''''plus''''' 1'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''do {'''&lt;br /&gt;
&lt;br /&gt;
'''x = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''} while(x * x&amp;lt;nowiki&amp;gt; &amp;lt; &amp;lt;/nowiki&amp;gt;n);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Then,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''while(x ''into (star)'' x&amp;lt;nowiki&amp;gt; &amp;lt; &amp;lt;/nowiki&amp;gt;n)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Close with a semi-colon&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Point to the condition then increment statement.'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| As long a '''x '''''into '''''x '''is less than '''n''', we keep incrementing the value of x.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| So when the loop stops, the reverse of this condition will be true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Which means either x into x must be equal to n.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or x into x must be greater than n.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| If '''x '''''into '''''x''' is equal to '''n''', the number is a perfect square.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is not equal to n, the number is not a perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| So finally, we print the condition.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(x * x == n);'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''System.out.println(x * x == n);'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us see the code in action.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Save''' and '''Run'''. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| As we can see, the output is '''true'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us with another perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Change n = 25 to n = 49'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''n = 49;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Save and Run&lt;br /&gt;
&lt;br /&gt;
We again get a true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us try with a number which is not a perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Change '''n = 25''' to '''n = 23'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and Run. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to output.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Change 25 to 23.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We get a false.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see what happens when the value of '''n''' is 0.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Change n = 23 to n = 0&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Since 0 is not a natural number, we must get a false.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us run the code.&lt;br /&gt;
&lt;br /&gt;
Save. Run.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We see that we get false as expected.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This happens because even before the condition&lt;br /&gt;
&lt;br /&gt;
'''x''' ''into''''' x''' ''is less than '''''n '''is checked, the value of x is incremented and it becomes 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The loop condition fails and loop does not run.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| That way, by using a do-while loop, we make sure that 0 is not considered as a perfect square.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This way, a do-while loop is used for solving a range of problems.&lt;br /&gt;
&lt;br /&gt;
Specially, when the loop must run at least once.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| This brings us to the end of the tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we learnt about the &lt;br /&gt;
&lt;br /&gt;
do-while loop and how to use it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| As an assignment for this tutorial, solve the following problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given a binary number, find out its decimal equivalent. Example: '''11010 =&amp;gt; 26'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarizes the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link. It summarizes the project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This tutorial has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;&amp;quot;| This tutorial has been contributed by '''TalentSprint'''. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English</id>
		<title>Java/C2/Introduction-to-Array/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English"/>
				<updated>2013-01-22T05:23:01Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Introduction to Arrays&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' arrays, java, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Introduction to Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how&lt;br /&gt;
&lt;br /&gt;
* to '''create arrays''' and&lt;br /&gt;
* access elements in '''arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10'''&lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge of '''data types''' and '''for loop in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5 and 6&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight index column as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Arrays are a collection of data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, a list of marks, a list of names, a list of temperatures or as shown on the slide, a list of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each item has an index based on its position. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The index of the first element is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second element has index 1 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now see how to store this data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So switch to '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''class''' named '''ArraysDemo '''has already been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Within the main method, let us add the rainfall data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
'''int rainfall&amp;lt;nowiki&amp;gt;[] = {25, 31, 29, 13, 27, 35, 12};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int rainfall '''''open close square brackets equal to''''' '''''within curly brackets''''' 25, 31, 29, 13, 27, 35, 12 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the square braces after the '''variable '''name''' rainfall'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This declares '''rainfall''' as an '''array''' of '''integers'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The braces are used to specify the elements of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us access data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(rainfall&amp;lt;nowiki&amp;gt;[2]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next line, type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System '''''dot '''''out '''''dot'' '''println '''within brackets''' rainfall '''then within square brackets 2 semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are printing the element with index 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, the third element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now run the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the ouput&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the output is the third value, '''29'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us try a different index.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''rainfall&amp;lt;nowiki&amp;gt;[2]&amp;lt;/nowiki&amp;gt;''' to '''rainfall&amp;lt;nowiki&amp;gt;[0]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''2''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the output is the first value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us modify a value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the '''Syste...''' line, type&lt;br /&gt;
&lt;br /&gt;
'''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall change the value of the first item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see its value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value has been changed to 11.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now what if we only know the size of the array and do not know the values.&lt;br /&gt;
Let us see how to create such array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove everything in main function and type&lt;br /&gt;
'''int squares&amp;lt;nowiki&amp;gt;[] = &amp;lt;/nowiki&amp;gt;new int&amp;lt;nowiki&amp;gt;[10];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
This statement creates an array of integers having 10 elements. The name of the array is '''squares'''.&lt;br /&gt;
Now let us add some values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have entered the squares of first four numbers. Now what about the other elements of the array. Let us see what they contain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall print the sixth value in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see that the value is zero. This is because when we create an array of integers, all the values are initialized to 0. Similarly an array of floats will have all its values initialized to 0.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would be a long process if we have to type each value into the array. Instead, let us use a for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| After the '''squares&amp;lt;nowiki&amp;gt;[3]&amp;lt;/nowiki&amp;gt;''' line, type&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4; x&amp;lt;nowiki&amp;gt; &amp;lt; 10; &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4; x&amp;lt;nowiki&amp;gt; &amp;lt; 10;&amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''} '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We iterate over numbers from 4 to 9 and set the corresponding element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the sixth element now is the square of 6, which is 36.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In fact now we can set all the values inside the for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove all the lines from&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0]... &amp;lt;/nowiki&amp;gt;'''to '''squares&amp;lt;nowiki&amp;gt;[3]...&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''x = 4''' to '''x = 0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''println(squares&amp;lt;nowiki&amp;gt;[5])&amp;lt;/nowiki&amp;gt;''' to&lt;br /&gt;
&lt;br /&gt;
'''println(squares&amp;lt;nowiki&amp;gt;[2])&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the lines that set the values manually and change '''4''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This way all the elements from index 0 to index 9 are set to the corresponding squares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall now see the value of the third element.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change '''5 '''to '''2'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value of third element has been set in the loop and it is 9.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This way, arrays can be created and used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 7&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use for loop in java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given an array of integers, find the sum of all the elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link. It summarises the project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 12'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This script has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This script has been contributed by '''TalentSprint'''. &lt;br /&gt;
&lt;br /&gt;
This is Prathamesh Salunke signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English</id>
		<title>Java/C2/Introduction-to-Array/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English"/>
				<updated>2013-01-22T05:16:18Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Introduction to Arrays&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' arrays, java, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Introduction to Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how&lt;br /&gt;
&lt;br /&gt;
* to '''create arrays''' and&lt;br /&gt;
* access elements in '''arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10'''&lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge of '''data types''' and '''for loop in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5 and 6&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight index column as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Arrays are a collection of data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, a list of marks, a list of names, a list of temperatures or as shown on the slide, a list of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each item has an index based on its position. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The index of the first element is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second element has index 1 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now see how to store this data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So switch to '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''class''' named '''ArraysDemo '''has already been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Within the main method, let us add the rainfall data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
'''int rainfall&amp;lt;nowiki&amp;gt;[] = {25, 31, 29, 13, 27, 35, 12};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int rainfall '''''open close square brackets equal to''''' '''''within curly brackets''''' 25, 31, 29, 13, 27, 35, 12 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the square braces after the '''variable '''name''' rainfall'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This declares '''rainfall''' as an '''array''' of '''integers'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The braces are used to specify the elements of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us access data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(rainfall&amp;lt;nowiki&amp;gt;[2]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next line, type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System '''''dot '''''out '''''dot'' '''println '''within brackets''' rainfall '''then within square brackets 2 semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are printing the element with index 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, the third element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now run the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the ouput&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the output is the third value, '''29'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us try a different index.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''rainfall&amp;lt;nowiki&amp;gt;[2]&amp;lt;/nowiki&amp;gt;''' to '''rainfall&amp;lt;nowiki&amp;gt;[0]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''2''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the output is the first value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us modify a value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the '''Syste...''' line, type&lt;br /&gt;
&lt;br /&gt;
'''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall change the value of the first item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see its value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value has been changed to 11.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now what if we only know the size of the array and do not know the values.&lt;br /&gt;
Let us see how to create such array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove everything in main function and type&lt;br /&gt;
'''int squares&amp;lt;nowiki&amp;gt;[] = &amp;lt;/nowiki&amp;gt;new int&amp;lt;nowiki&amp;gt;[10];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
This statement creates an array of integers having 10 elements. The name of the array is '''squares'''.&lt;br /&gt;
Now let us add some values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have entered the squares of first four numbers. Now what about the other elements of the array. Let us see what they contain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall print the sixth value in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see that the value is zero. This is because when we create an array of integers, all the values are initialized to 0. Similarly an array of floats will have all its values initialized to 0.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would be a long process if we have to type each value into the array. Instead, let us use a for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| After the '''squares&amp;lt;nowiki&amp;gt;[3]&amp;lt;/nowiki&amp;gt;''' line, type&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''} '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We iterate over numbers from 4 to 9 and set the corresponding element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the sixth element now is the square of 6, which is 36.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In fact now we can set all the values inside the for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove all the lines from&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0]... &amp;lt;/nowiki&amp;gt;'''to '''squares&amp;lt;nowiki&amp;gt;[3]...&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''x = 4''' to '''x = 0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''println(squares&amp;lt;nowiki&amp;gt;[5])&amp;lt;/nowiki&amp;gt;''' to&lt;br /&gt;
&lt;br /&gt;
'''println(squares&amp;lt;nowiki&amp;gt;[2])&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the lines that set the values manually and change '''4''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This way all the elements from index 0 to index 9 are set to the corresponding squares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall now see the value of the third element.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change '''5 '''to '''2'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value of third element has been set in the loop and it is 9.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This way, arrays can be created and used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 7&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use for loop in java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given an array of integers, find the sum of all the elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link. It summarises the project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 12'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This script has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This script has been contributed by '''TalentSprint'''. &lt;br /&gt;
&lt;br /&gt;
This is Prathamesh Salunke signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English</id>
		<title>Java/C2/Introduction-to-Array/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English"/>
				<updated>2013-01-21T12:58:23Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Introduction to Arrays&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' arrays, java, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Introduction to Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how&lt;br /&gt;
&lt;br /&gt;
* to '''create arrays''' and&lt;br /&gt;
* access elements in '''arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10'''&lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge of '''data types''' and '''for loop in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5 and 6&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight index column as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Arrays are a collection of data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, a list of marks, a list of names, a list of temperatures or as shown on the slide, a list of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each item has an index based on its position. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The index of the first element is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second element has index 1 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now see how to store this data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So switch to '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''class''' named '''ArraysDemo '''has already been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Within the main method, let us add the rainfall data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
'''int rainfall&amp;lt;nowiki&amp;gt;[] = {25, 31, 29, 13, 27, 35, 12};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int rainfall '''''open close square brackets equal to''''' '''''within curly brackets''''' 25, 31, 29, 13, 27, 35, 12 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the square braces after the '''variable '''name''' rainfall'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This declares '''rainfall''' as an '''array''' of '''integers'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The braces are used to specify the elements of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us access data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(rainfall&amp;lt;nowiki&amp;gt;[2]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next line, type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System '''''dot '''''out '''''dot'' '''println '''within brackets''' rainfall '''then within square brackets 2 semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are printing the element with index 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, the third element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now run the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the ouput&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the output is the third value, '''29'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us try a different index.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''rainfall&amp;lt;nowiki&amp;gt;[2]&amp;lt;/nowiki&amp;gt;''' to '''rainfall&amp;lt;nowiki&amp;gt;[0]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''2''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the output is the first value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us modify a value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the '''Syste...''' line, type&lt;br /&gt;
&lt;br /&gt;
'''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall change the value of the first item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see its value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value has been changed to 11.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now what if we only know the size of the array and do not know the values.&lt;br /&gt;
Let us see how to create such array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove everything in main function and type&lt;br /&gt;
'''int squares&amp;lt;nowiki&amp;gt;[] = &amp;lt;/nowiki&amp;gt;new int&amp;lt;nowiki&amp;gt;[10];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
This statement creates an array of 10 inetgers called '''squares.'''&lt;br /&gt;
Now let us add some values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have entered the squares of first four numbers. Now what about the other elements of the array. Let us see what they contain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall print the sixth value in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see that the value is zero. This is because when we create an array of integers, all the values are initialized to 0. Similarly an array of floats will have all its values initialized to 0.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would be a long process if we have to type each value into the array. Instead, let us use a for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| After the '''squares&amp;lt;nowiki&amp;gt;[3]&amp;lt;/nowiki&amp;gt;''' line, type&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''} '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We iterate over numbers from 4 to 9 and set the corresponding element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the sixth element now is the square of 6, which is 36.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In fact now we can set all the values inside the for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove all the lines from&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0]... &amp;lt;/nowiki&amp;gt;'''to '''squares&amp;lt;nowiki&amp;gt;[3]...&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''x = 4''' to '''x = 0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''println(squares&amp;lt;nowiki&amp;gt;[5])&amp;lt;/nowiki&amp;gt;''' to&lt;br /&gt;
&lt;br /&gt;
'''println(squares&amp;lt;nowiki&amp;gt;[2])&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the lines that set the values manually and change '''4''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This way all the elements from index 0 to index 9 are set to the corresponding squares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall now see the value of the third element.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change '''5 '''to '''2'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value of third element has been set in the loop and it is 9.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This way, arrays can be created and used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 7&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use for loop in java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given an array of integers, find the sum of all the elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link. It summarises the project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 12'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This script has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This script has been contributed by '''TalentSprint'''. &lt;br /&gt;
&lt;br /&gt;
This is Prathamesh Salunke signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English</id>
		<title>Java/C2/Introduction-to-Array/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English"/>
				<updated>2013-01-21T12:57:29Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Introduction to Arrays&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' arrays, java, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Introduction to Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how&lt;br /&gt;
&lt;br /&gt;
* to '''create arrays''' and&lt;br /&gt;
* access elements in '''arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10'''&lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge of '''data types''' and '''for loop in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5 and 6&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight index column as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Arrays are a collection of data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, a list of marks, a list of names, a list of temperatures or as shown on the slide, a list of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each item has an index based on its position. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The index of the first element is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second element has index 1 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now see how to store this data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So switch to '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''class''' named '''ArraysDemo '''has already been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Within the main method, let us add the rainfall data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
'''int rainfall&amp;lt;nowiki&amp;gt;[] = {25, 31, 29, 13, 27, 35, 12};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int rainfall '''''open close square brackets equal to''''' '''''within curly brackets''''' 25, 31, 29, 13, 27, 35, 12 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the square braces after the '''variable '''name''' rainfall'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This declares '''rainfall''' as an '''array''' of '''integers'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The braces are used to specify the elements of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us access data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(rainfall&amp;lt;nowiki&amp;gt;[2]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next line, type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System '''''dot '''''out '''''dot'' '''println '''within brackets''' rainfall '''then within square brackets 2 semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are printing the element with index 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, the third element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now run the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the ouput&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the output is the third value, '''29'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us try a different index.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''rainfall&amp;lt;nowiki&amp;gt;[2]&amp;lt;/nowiki&amp;gt;''' to '''rainfall&amp;lt;nowiki&amp;gt;[0]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''2''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the output is the first value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us modify a value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the '''Syste...''' line, type&lt;br /&gt;
&lt;br /&gt;
'''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall change the value of the first item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see its value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value has been changed to 11.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now what if we only know the size of the array and do not know the values.&lt;br /&gt;
Let us see how to create such array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove everything in main function and type&lt;br /&gt;
'''int squares&amp;lt;nowiki&amp;gt;[] = &amp;lt;/nowiki&amp;gt;new int&amp;lt;nowiki&amp;gt;[10];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
This statement creates an array of 10 inetgers called '''squares.'''&lt;br /&gt;
Now let us add some values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have entered the squares of first four numbers. Now what about the other elements of the array. Let us see what they contain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall print the sixth value in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see that the value is zero. This is because when we create an array of integers, all the values are initialized to 0. Similarly an array of floats will have all its values initialized to 0.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would be a long process if we have to type each value into the array. Instead, let us use a for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| After the '''squares&amp;lt;nowiki&amp;gt;[3]&amp;lt;/nowiki&amp;gt;''' line, type&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''} '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We iterate over numbers from 4 to 9 and set the corresponding element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the sixth element now is the square of 6, which is 36.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In fact now we can set all the values inside the for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove all the lines from&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0]... &amp;lt;/nowiki&amp;gt;'''to '''squares&amp;lt;nowiki&amp;gt;[3]...&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''x = 4''' to '''x = 0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''println(squares&amp;lt;nowiki&amp;gt;[5])&amp;lt;/nowiki&amp;gt;''' to&lt;br /&gt;
&lt;br /&gt;
'''println(squares&amp;lt;nowiki&amp;gt;[2])&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the lines that set the values manually and change '''4''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This way all the elements from index 0 to index 9 are set to the corresponding squares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall now see the value of the third element.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change '''5 '''to '''2'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value of third element has been set in the loop and it is 9.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This way, arrays can be created and used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 7&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use for loop in java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given an array of integers, find the sum of all the elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link. It summarises the project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 12'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This script has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This script has been contributed by '''TalentSprint'''. &lt;br /&gt;
&lt;br /&gt;
This is Prathamesh Salunke signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English</id>
		<title>Java/C2/Introduction-to-Array/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English"/>
				<updated>2013-01-21T12:56:53Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Introduction to Arrays&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' arrays, java, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Introduction to Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how&lt;br /&gt;
&lt;br /&gt;
* to '''create arrays''' and&lt;br /&gt;
* access elements in '''arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10'''&lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge of '''data types''' and '''for loop in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5 and 6&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight index column as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Arrays are a collection of data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, a list of marks, a list of names, a list of temperatures or as shown on the slide, a list of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each item has an index based on its position. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The index of the first element is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second element has index 1 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now see how to store this data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So switch to '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''class''' named '''ArraysDemo '''has already been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Within the main method, let us add the rainfall data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
'''int rainfall&amp;lt;nowiki&amp;gt;[] = {25, 31, 29, 13, 27, 35, 12};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int rainfall '''''open close square brackets equal to''''' '''''within curly brackets''''' 25, 31, 29, 13, 27, 35, 12 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the square braces after the '''variable '''name''' rainfall'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This declares '''rainfall''' as an '''array''' of '''integers'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The braces are used to specify the elements of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us access data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(rainfall&amp;lt;nowiki&amp;gt;[2]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next line, type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System '''''dot '''''out '''''dot'' '''println '''within brackets''' rainfall '''then within square brackets 2 semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are printing the element with index 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, the third element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now run the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the ouput&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the output is the third value, '''29'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us try a different index.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''rainfall&amp;lt;nowiki&amp;gt;[2]&amp;lt;/nowiki&amp;gt;''' to '''rainfall&amp;lt;nowiki&amp;gt;[0]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''2''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the output is the first value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us modify a value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the '''Syste...''' line, type&lt;br /&gt;
&lt;br /&gt;
'''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall change the value of the first item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see its value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value has been changed to 11.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now what if we only know the size of the array and do not know the values.&lt;br /&gt;
Let us see how to create such array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove everything in main function and type&lt;br /&gt;
'''int squares&amp;lt;nowiki&amp;gt;[] = &amp;lt;/nowiki&amp;gt;new int&amp;lt;nowiki&amp;gt;[10];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement creates an array of 10 inetgers called '''squares.'''&lt;br /&gt;
Now let us add some values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have entered the squares of first four numbers. Now what about the other elements of the array. Let us see what they contain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall print the sixth value in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see that the value is zero. This is because when we create an array of integers, all the values are initialized to 0. Similarly an array of floats will have all its values initialized to 0.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would be a long process if we have to type each value into the array. Instead, let us use a for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| After the '''squares&amp;lt;nowiki&amp;gt;[3]&amp;lt;/nowiki&amp;gt;''' line, type&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''} '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We iterate over numbers from 4 to 9 and set the corresponding element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the sixth element now is the square of 6, which is 36.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In fact now we can set all the values inside the for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove all the lines from&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0]... &amp;lt;/nowiki&amp;gt;'''to '''squares&amp;lt;nowiki&amp;gt;[3]...&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''x = 4''' to '''x = 0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''println(squares&amp;lt;nowiki&amp;gt;[5])&amp;lt;/nowiki&amp;gt;''' to&lt;br /&gt;
&lt;br /&gt;
'''println(squares&amp;lt;nowiki&amp;gt;[2])&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the lines that set the values manually and change '''4''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This way all the elements from index 0 to index 9 are set to the corresponding squares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall now see the value of the third element.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change '''5 '''to '''2'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value of third element has been set in the loop and it is 9.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This way, arrays can be created and used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 7&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use for loop in java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given an array of integers, find the sum of all the elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link. It summarises the project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 12'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This script has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This script has been contributed by '''TalentSprint'''. &lt;br /&gt;
&lt;br /&gt;
This is Prathamesh Salunke signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English</id>
		<title>Java/C2/Introduction-to-Array/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Java/C2/Introduction-to-Array/English"/>
				<updated>2013-01-21T12:55:58Z</updated>
		
		<summary type="html">&lt;p&gt;Arya Ratish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Introduction to Arrays&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' arrays, java, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Introduction to Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how&lt;br /&gt;
&lt;br /&gt;
* to '''create arrays''' and&lt;br /&gt;
* access elements in '''arrays'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10'''&lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge of '''data types''' and '''for loop in Java.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorial please visit our website which as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 5 and 6&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight index column as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Arrays are a collection of data. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, a list of marks, a list of names, a list of temperatures or as shown on the slide, a list of numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each item has an index based on its position. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The index of the first element is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second element has index 1 and so on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now see how to store this data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So switch to '''Eclipse.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class ArraysDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| A '''class''' named '''ArraysDemo '''has already been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Within the main method, let us add the rainfall data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
'''int rainfall&amp;lt;nowiki&amp;gt;[] = {25, 31, 29, 13, 27, 35, 12};&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Inside main function, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int rainfall '''''open close square brackets equal to''''' '''''within curly brackets''''' 25, 31, 29, 13, 27, 35, 12 '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the square braces after the '''variable '''name''' rainfall'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This declares '''rainfall''' as an '''array''' of '''integers'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The braces are used to specify the elements of the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us access data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(rainfall&amp;lt;nowiki&amp;gt;[2]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight as you explain.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Next line, type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System '''''dot '''''out '''''dot'' '''println '''within brackets''' rainfall '''then within square brackets 2 semicolon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are printing the element with index 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, the third element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now run the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the ouput&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the output is the third value, '''29'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us try a different index.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''rainfall&amp;lt;nowiki&amp;gt;[2]&amp;lt;/nowiki&amp;gt;''' to '''rainfall&amp;lt;nowiki&amp;gt;[0]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Change '''2''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the output is the first value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us modify a value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Before the '''Syste...''' line, type&lt;br /&gt;
&lt;br /&gt;
'''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall change the value of the first item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''rainfall&amp;lt;nowiki&amp;gt;[0] = 11;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see its value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value has been changed to 11.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Now what if we only know the size of the array and do not know the values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see how to create such array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove everything in main function and type&lt;br /&gt;
'''int squares&amp;lt;nowiki&amp;gt;[] = &amp;lt;/nowiki&amp;gt;new int&amp;lt;nowiki&amp;gt;[10];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
This statement creates an array of 10 inetgers called '''squares.'''&lt;br /&gt;
Now let us add some values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0] = 1;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[1] = 4;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[2] = 9;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[3] = 16;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have entered the squares of first four numbers. Now what about the other elements of the array. Let us see what they contain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| In the next line, type&lt;br /&gt;
&lt;br /&gt;
'''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We shall print the sixth value in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''System.out.println(squares&amp;lt;nowiki&amp;gt;[5]);&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We see that the value is zero. This is because when we create an array of integers, all the values are initialized to 0. Similarly an array of floats will have all its values initialized to 0.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would be a long process if we have to type each value into the array. Instead, let us use a for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| After the '''squares&amp;lt;nowiki&amp;gt;[3]&amp;lt;/nowiki&amp;gt;''' line, type&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Type'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''int n, x&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for(x = 4, x&amp;lt;nowiki&amp;gt; &amp;lt; 10, &amp;lt;/nowiki&amp;gt;x = x + 1){'''&lt;br /&gt;
&lt;br /&gt;
'''n = x + 1;'''&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;x] = n * n'''&lt;br /&gt;
&lt;br /&gt;
'''} '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We iterate over numbers from 4 to 9 and set the corresponding element in the array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| As we can see, the sixth element now is the square of 6, which is 36.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In fact now we can set all the values inside the for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove all the lines from&lt;br /&gt;
&lt;br /&gt;
'''squares&amp;lt;nowiki&amp;gt;[0]... &amp;lt;/nowiki&amp;gt;'''to '''squares&amp;lt;nowiki&amp;gt;[3]...&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''x = 4''' to '''x = 0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''println(squares&amp;lt;nowiki&amp;gt;[5])&amp;lt;/nowiki&amp;gt;''' to&lt;br /&gt;
&lt;br /&gt;
'''println(squares&amp;lt;nowiki&amp;gt;[2])&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Remove the lines that set the values manually and change '''4''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This way all the elements from index 0 to index 9 are set to the corresponding squares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall now see the value of the third element.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change '''5 '''to '''2'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the value of third element has been set in the loop and it is 9.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This way, arrays can be created and used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 7&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use for loop in java.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The assignment for this tutorial is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given an array of integers, find the sum of all the elements in the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link. It summarises the project.If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| Slide 12'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This script has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.097cm;&amp;quot;| This script has been contributed by '''TalentSprint'''. &lt;br /&gt;
&lt;br /&gt;
This is Prathamesh Salunke signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya Ratish</name></author>	</entry>

	</feed>