<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gaurish Sharma Live &#187; Java</title>
	<atom:link href="http://www.gaurishsharma.com/category/java/feed" rel="self" type="application/rss+xml" />
	<link>http://www.gaurishsharma.com</link>
	<description>Gaurish Sharma&#039;s blog foccused on Technology,Broadband,Latest Offers. He seldomly writes about his life experiances</description>
	<lastBuildDate>Fri, 03 Sep 2010 21:08:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Learning Java Programming Language &#8211; Day 1</title>
		<link>http://www.gaurishsharma.com/2008/08/learning-java-programming-language-day.html</link>
		<comments>http://www.gaurishsharma.com/2008/08/learning-java-programming-language-day.html#comments</comments>
		<pubDate>Tue, 26 Aug 2008 10:41:00 +0000</pubDate>
		<dc:creator>gaurish</dc:creator>
				<category><![CDATA[Guides and Howtos]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://gaurishsharma.wordpress.com/2008/08/26/learning-java-programming-language-day-1/</guid>
		<description><![CDATA[I am Learning Java programming language these as its part of my course. Java is Object-oriented, structured, imperative language. Its syntax(grammar) is heavily inspired  from  C/C++. All those coders who have know basics of C/C++ won&#8217;t have much problems in learning java. Sun Microsystems defines java as The Java programming language is a high-level language [...]]]></description>
			<content:encoded><![CDATA[<div class="separator" style="clear:both;text-align:center;"><a href="http://4.bp.blogspot.com/_wMAC6frBFdw/SLPd0Yz1G_I/AAAAAAAAAP8/s44Q_p7Dgx4/s1600-h/java-logo_svg-a.jpg"><img src="http://4.bp.blogspot.com/_wMAC6frBFdw/SLPd0Yz1G_I/AAAAAAAAAP8/1SmO7sF290E/s200-R/java-logo_svg-a.jpg" border="0" alt="" /></a></div>
<p>I am Learning Java programming language these as its part of my course. Java is <a href="http://en.wikipedia.org/wiki/Object-oriented_programming">Object-oriented</a>, <a href="http://en.wikipedia.org/wiki/Structured_programming">structured</a>, <a href="http://en.wikipedia.org/wiki/Imperative_programming">imperative</a> language. Its syntax(grammar) is heavily inspired  from  <em>C/C++</em>. All those coders who have know basics of C/C++ won&#8217;t have much problems in learning java. Sun Microsystems defines java as<br />
<em>The Java programming language is a high-level language that can be characterized by all of the following buzzwords: </em>Simple,Architecture neutral,Object oriented,Portable,Distributed,High performance,Multithreaded,Robust,Dynamic,Secure</p>
<p>The main Advantage of <em>Java</em> is Portability, the code written in java can run on different platforms; independent of OS its coded. It can run on various platforms since its does not directly access the Host OS&#8217;s libraries and API&#8217;s . All code written in java is first compiled to bytecode by <em>java compiler</em>(javac) and the <em>java</em> launcher tool runs your application instance in <a href="http://en.wikipedia.org/wiki/Java_virtual_machine" target="_blank">Java Virtual Machine</a>(JVM).This method of running program allows programs to be platform independent as your code never comes in direct contact with host OS&#8217;s programming API. a mediator called <em>Java Virtual Machine</em>(JVM) with help of <em>Java Application Programming Interface</em> (API) automatically converts bytecode into machine readable code. The main disadvantage of <a href="http://en.wikipedia.org/wiki/Virtualization" target="_blank">Virtualization</a> technique is that it sacrifices on performance for portability. Java Applications are resource intensive and are slower than native applications.<br />
For example <a href="http://www.vuze.com/" target="_blank">Vuze</a>(Formerly known as Azureus) is  bittorrent Client entirely coded in java. it needs minimum of 256mb Memory and lots of CPU time. it runs on Windows,Mac OS,Linux etc. However its counterpart <em>µTorrent </em>runs exclusively on Windows platform and takes marginal resources. As a Developer when choosing which programming language to code your application in  you have to decide between speed &amp; portability.Java is highly portable so it should be used in making web applets and writing big applications in java should be generally avoided.</p>
<p><span style="font-size:large;"><strong>Writing First Program in Java</strong></span><br />
<span style="font-family:Arial;"><span style="font-family:Verdana;">Before we can proceed writing famous &#8220;Hello World&#8221; program, we need to setup environment accordingly. for coding in any High-level programming language we nee three basic things compiler,Text editor and Shell. for java we would need</span></span></p>
<ul>
<li>Language Compiler &#8211; <em>Java Development kit(JDK)</em></li>
<li>Text Editor &#8211; Notepad++</li>
<li>Shell/Console &#8211; depends on Platform, we would use <em>Windows Command Shell </em>aka <em>cmd</em></li>
</ul>
<p>Download JDK from <strong><a href="http://java.sun.com/javase/downloads/index.jsp" target="_blank">here</a></strong><strong>(</strong>74mb). Notepad++ from <a href="http://www.filehippo.com/download_notepad/" target="_blank"><strong>here</strong></a>(2mb). please note confuse notepad++ with windows notepad, both are entirely different. you can write your programs in notepad as well but windows notepad does not support basic programming functions like syntax highlighting. So its wise to use Notepad++.<br />
Installing JDK and notepad++ is real easy, its typical Next,Next,Next Wizard. after you finish installing Next Step is to open Notepad++ and type the following code.</p>
<pre class="csharpcode"><span style="font-size:xx-small;">public class hello
{
public static void main (String args[])
{
System.out.println("Hello World. My First Java Program!");
}
}</span></pre>
<p>Now save the file with <span style="font-family:&quot;">.java</span> extension and click on &#8220;<strong>Show console Dialog</strong>&#8221; icon from Standard toolbar in Notepad++. type &#8220;<em>cmd&#8221; </em>and you will get Windows Command Shell.<br />
Compling the program<br />
  <span style="font-family:&quot;">javac filename.java</span><br />
<span style="font-family:inherit;">Running the Program</span><br />
<span style="font-family:inherit;"> </span> <span style="font-family:&quot;">java filename</span><br />
<span style="font-family:&quot;"><span style="font-family:inherit;">make sure you are in dir where the file exists.</span></span><br />
<strong><span style="font-family:&quot;"><span style="font-family:inherit;">ScreenShot:</span></span></strong></p>
<p><a href="http://1.bp.blogspot.com/_wMAC6frBFdw/SLPZj1e4msI/AAAAAAAAAPs/66GOgnqb2hQ/s1600-h/notepad_java.JPG"><img src="http://1.bp.blogspot.com/_wMAC6frBFdw/SLPZj1e4msI/AAAAAAAAAPs/rJNmFLyH7K0/s320-R/notepad_java.JPG" border="0" alt="" /></a></p>
<div class="separator" style="clear:both;text-align:center;"> <a href="http://2.bp.blogspot.com/_wMAC6frBFdw/SLPZkNO0iAI/AAAAAAAAAP0/zkKUWKu02-Q/s1600-h/notepad_java2.JPG"><img src="http://2.bp.blogspot.com/_wMAC6frBFdw/SLPZkNO0iAI/AAAAAAAAAP0/NQe-zreIgYY/s320-R/notepad_java2.JPG" border="0" alt="" /></a> </div>
<div class="separator" style="clear:both;text-align:justify;">you can also use a <em>Integrated Development Environment</em>(IDE ) like <a href="http://www.eclipse.org/">Eclipse </a>which has a Text editor,Complier and Shell integrated into one application. its bit more complex and is more usefull in coding large applications. </div>
<div class="separator" style="clear:both;text-align:justify;">For online resources on Java have a look <a href="http://java.sun.com/docs/books/tutorial/">here</a>, <a href="http://www.freewarejava.com/tutorials/index.shtml">here</a> &amp; <a href="http://www.javaomatic.com/%20">here</a>. For java Books try <a href="http://www.informit.com/title/0321349806?aid=9f15cdfa-4e22-40dc-bfc9-cdc6322be0fd">Java™ Programming Language</a> by Arnold, Ken/Gosling, James/Holmes, David and  <a href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683">Effective Java</a> by Joshua Bloch</div>
<div class="separator" style="clear:both;text-align:justify;"><strong><br />
</strong></div>
<div class="separator" style="clear:both;text-align:justify;">Wish you make fastest applications with little bugs<strong><br />
</strong></div>
<div class="separator" style="clear:both;text-align:justify;"><strong>Happy Programming!<br />
</strong></div>
<p><span style="font-family:&quot;"><span style="font-family:inherit;"> </span> </span></p>
<div class="blogger-post-footer">Did you enjoy this Post?.Please give your feedback at contact at gaurishsharma.com.<br />
Read more at GaurishSharma.com</div>
<img src="http://www.gaurishsharma.com/?ak_action=api_record_view&id=40&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.gaurishsharma.com/2008/09/howto-change-display-language-in.html' rel='bookmark' title='Permanent Link: [Howto]: Change display Language in Windows Vista'>[Howto]: Change display Language in Windows Vista</a> <small>When buying a laptop from abroad, the biggest problem is...</small></li>
<li><a href='http://www.gaurishsharma.com/2010/05/getting-started-python-video-lecture.html' rel='bookmark' title='Permanent Link: Getting Started with Python Programming'>Getting Started with Python Programming</a> <small>Do Programming Languages scare you? Or You need some other...</small></li>
<li><a href='http://www.gaurishsharma.com/2008/06/java-is-finally-free-and-open-gpl.html' rel='bookmark' title='Permanent Link: Java is finally Free and Open! GPL Compatible.'>Java is finally Free and Open! GPL Compatible.</a> <small>Recently Sun Microsystems announced they were going to release Java...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gaurishsharma.com/2008/08/learning-java-programming-language-day.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
