<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9035447382718124967</id><updated>2025-01-26T11:09:17.897-08:00</updated><category term="Java"/><category term="computers"/><category term="eclipse"/><category term="lesson"/><category term="programing"/><category term="tutorial"/><category term="introduction"/><category term="attributes"/><category term="methods"/><category term="Object oriented programing"/><category term="classes"/><category term="conditionals"/><category term="else"/><category term="first program"/><category term="functions"/><category term="hello world"/><category term="if"/><category term="project"/><category term="reusability"/><category term="switch"/><title type='text'>Java &amp;amp; C++ Coding Basics</title><subtitle type='html'>Learning Object Oriented Programming in Java and C++ has never been so easy: here you will find tutorials and step-by-step guides on how to program with Java and C++ and become a great programmer in the most important technologies that drive the computer world nowadays.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://coding-basics.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://coding-basics.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>CodeMaster</name><uri>http://www.blogger.com/profile/15812391068093206919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9035447382718124967.post-6609191631882113563</id><published>2012-05-06T04:12:00.001-07:00</published><updated>2012-05-06T04:15:08.949-07:00</updated><title type='text'>Java Tips 1 - Project Organization</title><content type='html'>&lt;h1&gt;
Project Organization&lt;/h1&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are becoming a expert programmer, two things will eventually happen:&lt;br /&gt;
&lt;br /&gt;
You can now make bigger programs for bigger purposes.&lt;br /&gt;
You look at other&#39;s people code to learn something from them&lt;br /&gt;
&lt;br /&gt;
This is the part when being organized with your code will help you, and other programmers, get along and learn from other people&#39;s work and don&#39;t get lost in the process. If you follow a few guidelines while writing your program, you will soon realize that after a while you will follow those guidelines almost automatically, and if, for example, you &amp;nbsp;leave out a project for a couple of months because something important had to be done, and you come back to it, you will be thankful with yourself for following the guidelines.&lt;br /&gt;
&lt;br /&gt;
Now let&#39;s see some of the things we can do to stay organized:&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;
Guideline No. 1: Project creation&lt;/h1&gt;
&lt;br /&gt;
At this stage try to create a project with a &lt;b&gt;meaningful name&lt;/b&gt;, one that describes a little about what is it&#39;s main purpose.&lt;br /&gt;
Also keep your files &lt;b&gt;organized in folders&lt;/b&gt;. The source files in the &#39;src&#39; folder (same name as the package), the binary files in the &#39;bin&#39; folder, if you are using images or documents keep them all in a folder name &#39;data&#39;, and the documentation of your project, that you can put it in a folder called &#39;docs&#39;. This way you will quickly find the information every time you need it.&lt;br /&gt;
&lt;br /&gt;
Once you have this structure created, keep your &lt;b&gt;source files inside their own packages&lt;/b&gt;. What I usually do is create a package for the Graphic User Interface (named &#39;src.gui&#39;) and a package for the logic (named &#39;src.logic&#39;), so most of my projects have two layers of functionality. You can create more layers to include Data Base transactions or Security Layers and so on, but I recommend to have at least two.&lt;br /&gt;
&lt;br /&gt;
Finally, I would recommend not to mix the Eclipse&#39;s &quot;workspace&quot; folder with you &lt;b&gt;projects&#39; folders&lt;/b&gt;. Eclipse keeps it&#39;s session files in it&#39;s own workspace, with information about your working session, your preferences, and your projects. I like to keep my projects in my own folders depending on the topic I am working now, that way I can easily find it every time I need it. Doing so, I could properly tell you exactly where is a Java project that I made 5 years ago!!&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;
Guideline No. 2: Naming convention&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;br /&gt;
Here what you can do to make your project more readable and understandable is properly naming everything you create. As with the name of the project, try to name everything else with something meaningful.&lt;br /&gt;
&lt;br /&gt;
For packages, keep an &lt;b&gt;organized hierarchy&lt;/b&gt;, and names in lower case. I recommend creating a new package once you have 3 or more classes with similar functionality. For example: &lt;i&gt;src.logic&lt;/i&gt;, &lt;i&gt;src.gui&lt;/i&gt;, &lt;i&gt;src.logic.products&lt;/i&gt;, &lt;i&gt;src.logic.clients&lt;/i&gt;, etc.&lt;br /&gt;
All the Classes should begin with an upper case, and if it is composed by more than one word, each word should also begin with an upper case. For example: MyMainClass, Product, Client&lt;br /&gt;
The contents of a Class should always have the same order. Start with the class package and file imports. Then create the constants and attributes. Now you can create the Class Constructor and all it&#39;s methods. If the class has a &lt;i&gt;main method&lt;/i&gt; put it all the way to the end.&lt;br /&gt;
&lt;br /&gt;
I suggest naming the constants all in upper case, the attributes in lower case (the first letter), the methods in lower case and the variable in lower case.</content><link rel='replies' type='application/atom+xml' href='http://coding-basics.blogspot.com/feeds/6609191631882113563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coding-basics.blogspot.com/2012/05/java-tips-1-project-organization.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/6609191631882113563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/6609191631882113563'/><link rel='alternate' type='text/html' href='http://coding-basics.blogspot.com/2012/05/java-tips-1-project-organization.html' title='Java Tips 1 - Project Organization'/><author><name>CodeMaster</name><uri>http://www.blogger.com/profile/15812391068093206919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9035447382718124967.post-8210907560822251060</id><published>2012-04-16T07:24:00.001-07:00</published><updated>2012-04-17T22:46:20.866-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="attributes"/><category scheme="http://www.blogger.com/atom/ns#" term="classes"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="introduction"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="lesson"/><category scheme="http://www.blogger.com/atom/ns#" term="methods"/><category scheme="http://www.blogger.com/atom/ns#" term="programing"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Welcome Programmers</title><content type='html'>&lt;g:plusone annotation=&quot;inline&quot;&gt;&lt;/g:plusone&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;h1 style=&quot;text-align: center;&quot;&gt;


















Java Programming Tutorials and Lessons&lt;/h1&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3w5151QjGxYKyNxi9daZLrjhfpKeGSIO3nh4EId-TYi2am1Pv0bE74ZgptP9IkwPRWFw4tFwExNsdXUbvycopOCyIFjF-Mq0o55A4gRZD8Qyf6AhQAENcBO3rGFgkelLUPzWew1fohvQW/s1600/Java_logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3w5151QjGxYKyNxi9daZLrjhfpKeGSIO3nh4EId-TYi2am1Pv0bE74ZgptP9IkwPRWFw4tFwExNsdXUbvycopOCyIFjF-Mq0o55A4gRZD8Qyf6AhQAENcBO3rGFgkelLUPzWew1fohvQW/s320/Java_logo.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;



















Welcome to this new Java tutorial. I hope you like it and learn to program in Java really fast.&lt;/h2&gt;
&lt;h2&gt;














Very soon I will also include some Tutorials and Lessons about C++.&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
I have decided to start this blog as a way to reinforce what I have learned through the years and share with other people the knowledge. Learning Java is the best way to begin in the Object Oriented Programming world, since it is very intuitive and somehow easy to learn.
&lt;br /&gt;
&lt;br /&gt;
If you are wondering why learning Java is an important matter you can go ahead and check this article about the &lt;a href=&quot;http://spectrum.ieee.org/at-work/tech-careers/the-top-10-programming-languages&quot; target=&quot;_blank&quot;&gt;Top 10 Programming Languages&lt;/a&gt; and the &lt;a href=&quot;http://www.eweek.com/c/a/Application-Development/Top-10-Programming-Languages-to-Keep-You-Employed-719257/&quot; target=&quot;_blank&quot;&gt;Top 10 Programming Languages to keep you employed&lt;/a&gt;. Java is one of the most used programming languages for enterprise&amp;nbsp;custom-application development, and one of the easiest to dive into the object-oriented-programming.&lt;br /&gt;
&lt;br /&gt;
Finally take a look at this graph:

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_YTOCnVOQHxknPyHFHZG4jgIuMAo6SGe_JYmimScj2Rg7r1XKPEsDueC9CxhTvq9tBUiSZR9mP_IoTb8p6jMGrtre8wn_opUWaid28iFQtdzM8ZJFX8gPH4iBMe5L_3n269wD52j8MjJR/s1600/graph.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_YTOCnVOQHxknPyHFHZG4jgIuMAo6SGe_JYmimScj2Rg7r1XKPEsDueC9CxhTvq9tBUiSZR9mP_IoTb8p6jMGrtre8wn_opUWaid28iFQtdzM8ZJFX8gPH4iBMe5L_3n269wD52j8MjJR/s320/graph.png&quot; width=&quot;280&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b style=&quot;font-family: verdana, sans-serif; font-size: 10px; text-align: -webkit-auto;&quot;&gt;Programming Language Popularity&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 10px; text-align: -webkit-auto;&quot;&gt;These are normalized results taken from several&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 10px; text-align: -webkit-auto;&quot;&gt;different result sets featured on&lt;/span&gt;&lt;a href=&quot;http://www.langpop.com/&quot; style=&quot;color: #666666; font-family: verdana, sans-serif; font-size: 10px; text-align: -webkit-auto;&quot;&gt;LangPop.com&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
With Java you can also create fast and useful applications for yourself or anyone who needs a specific task to be automatized. I have used Java to create some cool stuff from small games to time-saving applications.&lt;br /&gt;
&lt;br /&gt;
Now here you can find the lessons created until now. I will leave this post on top of the blog so you can continue with the lesson you left the last time:&lt;br /&gt;
&lt;br /&gt;
Don&#39;t forget to follow me on Twitter to get the latest updates.&lt;br /&gt;
&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/03/oop1-level-1.html&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;








&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/03/oop1-level-1.html&quot; target=&quot;_blank&quot;&gt; -Java Tutorial &amp;amp; Lesson 1 - &lt;i&gt;Getting Started&lt;/i&gt;&lt;/a&gt;&lt;/h3&gt;
Set up the required components to start programming in Java, including the Java Development Kit (JDK) and the Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/level-0-getting-started-part-2.html&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;










&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/level-0-getting-started-part-2.html&quot; target=&quot;_blank&quot;&gt; -Java Tutorial &amp;amp; Lesson 2 - &lt;i&gt;Setting up a Project on Eclipse&lt;/i&gt;&lt;/a&gt;&lt;/h3&gt;
Create a Java project to start using the infinite possibilities of the Eclipse IDE for Java.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/level-0-getting-started-part-3-final.html&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;










&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/level-0-getting-started-part-3-final.html&quot; target=&quot;_blank&quot;&gt; -Java Tutorial &amp;amp; Lesson 3 -&amp;nbsp;&lt;i&gt;Writing&amp;nbsp;the first program: Hello World!&lt;/i&gt;&lt;/a&gt;&lt;/h3&gt;
Say Hello with these simple steps and create your first Java program.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/level-0-getting-started-part-4-final.html&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;










&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/level-0-getting-started-part-4-final.html&quot; target=&quot;_blank&quot;&gt; -Java Tutorial &amp;amp; Lesson 4 - &lt;i&gt;Understanding Variables and Data Types&lt;/i&gt;&lt;/a&gt;&lt;/h3&gt;
Learn about storing information with certain variables depending on the type of that information and then learn how to use it. Some examples are included in this and almost all the following posts.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/in-order-to-create-more-complex.html&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;










&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/in-order-to-create-more-complex.html&quot; target=&quot;_blank&quot;&gt; -Java Tutorial &amp;amp; Lesson 5 - &lt;i&gt;Understanding&amp;nbsp;Methods and Attributes&lt;/i&gt;&lt;/a&gt;&lt;/h3&gt;
Create the first methods to group functions that you will reuse in the future. Attributes are very useful for these kind of &lt;i&gt;global&lt;/i&gt; functions.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/java-tutorial-lesson-6-understanding.html&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;










&lt;a href=&quot;http://coding-basics.blogspot.fr/2012/04/java-tutorial-lesson-6-understanding.html&quot; target=&quot;_blank&quot;&gt; -Java Tutorial &amp;amp; Lesson 6 - &lt;i&gt;Making decisions with Conditionals&lt;/i&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;
Let your program make the right decision when confronted with a set of possibilities.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Please feel free to comment and ask if you have any questions, your feedback will be greatly appreciated.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://coding-basics.blogspot.com/feeds/8210907560822251060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coding-basics.blogspot.com/2012/04/welcome.html#comment-form' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/8210907560822251060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/8210907560822251060'/><link rel='alternate' type='text/html' href='http://coding-basics.blogspot.com/2012/04/welcome.html' title='Welcome Programmers'/><author><name>CodeMaster</name><uri>http://www.blogger.com/profile/15812391068093206919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3w5151QjGxYKyNxi9daZLrjhfpKeGSIO3nh4EId-TYi2am1Pv0bE74ZgptP9IkwPRWFw4tFwExNsdXUbvycopOCyIFjF-Mq0o55A4gRZD8Qyf6AhQAENcBO3rGFgkelLUPzWew1fohvQW/s72-c/Java_logo.png" height="72" width="72"/><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9035447382718124967.post-1599470220852932782</id><published>2012-04-16T07:24:00.000-07:00</published><updated>2012-04-17T22:17:22.096-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="conditionals"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="else"/><category scheme="http://www.blogger.com/atom/ns#" term="if"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="lesson"/><category scheme="http://www.blogger.com/atom/ns#" term="programing"/><category scheme="http://www.blogger.com/atom/ns#" term="switch"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Java Tutorial &amp; Lesson 6 - Making decisions with Conditionals</title><content type='html'>&lt;br /&gt;
&lt;h1&gt;




















How to use Java conditionals if and switch&lt;/h1&gt;
&lt;br /&gt;
Conditionals are a very important part in any program language. Very useful&amp;nbsp;particularly&amp;nbsp;when you have many options and have to let the computer choose one of them (&lt;i&gt;making a decision&lt;/i&gt;) before operating. These kind of computer-decisions are called &lt;i&gt;conditional expressions&lt;/i&gt;, and they are usually an equality or inequality that can be evaluated to either true or false. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;


















If-else conditionals in Java&lt;/h2&gt;
&lt;br /&gt;
For example, an equality evaluation in Java goes like this:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;if( a == b ) //This expressions evaluate if a is equals to b.
{
    System.out.println( &quot;a and b are the same.&quot;);
}
else //If they are not equal, the message inside the &quot;else&quot; will be printed.
{
    System.out.println( &quot;a and b are different.&quot;);
}
&lt;/pre&gt;
&lt;br /&gt;
This can also be written like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;if( a == b )
{
    System.out.println( &quot;a and b are the same.&quot;);
}
else if( a != b ) //In Java, != is the opposite of ==
{
    System.out.println( &quot;a and b are different.&quot;);
}&lt;/pre&gt;
&lt;br /&gt;
The last two expressions will show the same result. Now, an inequality evaluation in Java goes like this:
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;if( a &amp;gt; b )
{
    System.out.println( &quot;a is greater than b.&quot;);
}
else if ( a &amp;lt;= b )
{
    System.out.println( &quot;a is lesser or equal than b.&quot;);
}
&lt;/pre&gt;
&lt;br /&gt;
In this example a and be can have any value, for example a could be 2 and b could be 3.5. Now we have seen the different uses of &lt;i&gt;if&lt;/i&gt; and &lt;i&gt;else&lt;/i&gt; in java conditionals. Don&#39;t forget to use two equal (=) symbols when writing a conditional expression, otherwise it wouldn&#39;t be a comparison but a declaration.&lt;br /&gt;
&lt;br /&gt;
Also, we can create more complex statements by comparing not only one but many expressions at the same time. The way to do this is by using the symbols &lt;b&gt;&amp;amp;&amp;amp;&lt;/b&gt; and &lt;b&gt;||&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;amp;&amp;amp; : Evaluates if two or more expressions are true.&lt;/li&gt;
&lt;li&gt;|| : Evaluates if &lt;i&gt;&lt;b&gt;at least one&lt;/b&gt;&lt;/i&gt; of two or many expressions is true.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
For example if we want to now if a given variable &lt;i&gt;x&lt;/i&gt; is greater than five AND lesser than 10:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;if( x &amp;gt; 5 &amp;amp;&amp;amp; x &amp;lt; 10 )
{
    System.out.println( &quot;x is greater than 5 AND lesser 10.&quot;);
}
else
{
    System.out.println( &quot;x is not greater than 5 AND lesser 10.&quot;);
}&lt;/pre&gt;
&lt;br /&gt;
Or for example if we want to know if a given String variable &lt;i&gt;name&lt;/i&gt; is equals to &quot;Tom&quot; OR it is equals to &quot;Fabienne&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;if( name.equals(&quot;Tom&quot;) ||&amp;nbsp;name.equals(&quot;Fabienne&quot;) )
{
    System.out.println( &quot;The variable name equals Tom OR equals Fabienne&quot;);
}
else
{
    System.out.println( &quot;The variable name is neither equals Tom nor equals Fabienne&quot;);
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;h2&gt;


















Switch-Case conditionals in Java&lt;/h2&gt;
Let&#39;s see an example of these conditionals:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;int apples = 5;
switch (apples) 
{
  case 0: 
    System.out.println( &quot;You have no apples.&quot;);
    break;
  case 1: 
    System.out.println( &quot;You have 1 apple.&quot;);
    break;
  case 2: 
    System.out.println( &quot;You have 2 apple.&quot;);
    break;
  default: 
    System.out.println( &quot;You have 3 or more apples.&quot;);
}
&lt;/pre&gt;
&lt;br /&gt;
This kind of conditional can be very useful in some cases that you want to make sure the exact value of a variable. I personally prefer to use the if-else conditional because it is easier to read and faster to write (you don&#39;t have to write all those &lt;i&gt;case/break&lt;/i&gt;).&lt;br /&gt;
&lt;br /&gt;
Now let&#39;s see some a more complex example:&lt;br /&gt;
&lt;br /&gt;
Let&#39;s say we have a small business and we sell some items. There are 6 items and three different categories. These are the items:&lt;br /&gt;
Category: games. Items: Play Station, Xbox.&lt;br /&gt;
Category: computers. Items: PC, Mac.&lt;br /&gt;
Category: smartphones. Items: Samsung, iPhone.&lt;br /&gt;
&lt;br /&gt;
First you want to know what was the best selling item, and then, you want to know if any item in the smartphones category was the best selling item.&lt;br /&gt;
&lt;br /&gt;
Here is the current data of sold items:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;int playStation = 6;
int xbox = 8;
int computer = 9;
int mac = 6;
int samsung = 10;
int iphone = 5;
&lt;/pre&gt;
&lt;br /&gt;
Now let&#39;s verify what item was the best selling:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;if(playStation&amp;gt;=xbox &amp;amp;&amp;amp; playstation&amp;gt;=computer &amp;amp;&amp;amp; playStation&amp;gt;=mac &amp;amp;&amp;amp; playStation&amp;gt;=samsung &amp;amp;&amp;amp; playStation&amp;gt;=iphone)
{
    System.out.println( &quot;The Play Station was the best selling item.&quot;);
}
else if(xbox&amp;gt;=computer &amp;amp;&amp;amp; xbox&amp;gt;=mac &amp;amp;&amp;amp; xbox&amp;gt;=samsung &amp;amp;&amp;amp; xbox&amp;gt;=iphone)
{
    System.out.println( &quot;The Xbox was the best selling item.&quot;);
}
else if(computer&amp;gt;=mac &amp;amp;&amp;amp; computer&amp;gt;=samsung &amp;amp;&amp;amp; computer&amp;gt;=iphone)
{
    System.out.println( &quot;The Computer was the best selling item.&quot;);
}
else if(mac&amp;gt;=samsung &amp;amp;&amp;amp; mac&amp;gt;=iphone)
{
    System.out.println( &quot;The Mac was the best selling item.&quot;);
}
else if(samsung&amp;gt;=iphone)
{
    System.out.println( &quot;The Samsung was the best selling item.&quot;);
}
else
{
    System.out.println( &quot;The iPhone was the best selling item.&quot;);
}
&lt;/pre&gt;
&lt;br /&gt;
Finally, let&#39;s verify if and item in the smartphones category was the best selling item:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;if( (samsung&amp;gt;=playStation &amp;amp;&amp;amp; samsung&amp;gt;=xbox &amp;amp;&amp;amp; samsung&amp;gt;=computer &amp;amp;&amp;amp; samsung&amp;gt;=mac ) || ( iphone&amp;gt;=playStation &amp;amp;&amp;amp; iphone&amp;gt;=xbox &amp;amp;&amp;amp; iphone&amp;gt;=computer &amp;amp;&amp;amp; iphone&amp;gt;=mac ))
{
    System.out.println( &quot;The smartphones category was the best selling category.&quot;);
}
&lt;/pre&gt;
&lt;br /&gt;
In short the final program would look like this:&lt;br /&gt;
Note: I have created two methods: one for best selling item, and another one to verify if Smartphones is the best selling category. Thus, I have put the values of each sale as attribute to be able to use them in the different methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;private static int playStation = 6;
private static int xbox = 8;
private static int computer = 9;
private static int mac = 6;
private static int samsung = 10;
private static int iphone = 5;

static void printBestSellingItem()
{
    if(playStation&amp;gt;=xbox &amp;amp;&amp;amp; playstation&amp;gt;=computer &amp;amp;&amp;amp; playStation&amp;gt;=mac &amp;amp;&amp;amp; playStation&amp;gt;=samsung &amp;amp;&amp;amp; playStation&amp;gt;=iphone)
    {
        System.out.println( &quot;The Play Station was the best selling item.&quot;);
    }
    else if(xbox&amp;gt;=computer &amp;amp;&amp;amp; xbox&amp;gt;=mac &amp;amp;&amp;amp; xbox&amp;gt;=samsung &amp;amp;&amp;amp; xbox&amp;gt;=iphone)
    {
        System.out.println( &quot;The Xbox was the best selling item.&quot;);
    }
    else if(computer&amp;gt;=mac &amp;amp;&amp;amp; computer&amp;gt;=samsung &amp;amp;&amp;amp; computer&amp;gt;=iphone)
    {
        System.out.println( &quot;The Computer was the best selling item.&quot;);
    }
    else if(mac&amp;gt;=samsung &amp;amp;&amp;amp; mac&amp;gt;=iphone)
    {
        System.out.println( &quot;The Mac was the best selling item.&quot;);
    }
    else if(samsung&amp;gt;=iphone)
    {
        System.out.println( &quot;The Samsung was the best selling item.&quot;);
    }
    else
    {
        System.out.println( &quot;The iPhone was the best selling item.&quot;);
    }
}

static void isSmartPhonesBestCategory()
{
    if( (samsung&amp;gt;=playStation &amp;amp;&amp;amp; samsung&amp;gt;=xbox &amp;amp;&amp;amp; samsung&amp;gt;=computer &amp;amp;&amp;amp; samsung&amp;gt;=mac ) || ( iphone&amp;gt;=playStation &amp;amp;&amp;amp; iphone&amp;gt;=xbox &amp;amp;&amp;amp; iphone&amp;gt;=computer &amp;amp;&amp;amp; iphone&amp;gt;=mac ))
    {
        System.out.println( &quot;The smartphones category was the best selling category.&quot;);
    }
}

public static void main(String[] args) 
{
    printBestSellingItem();
    isSmartPhonesBestCategory();
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
In this final example, we have included the key word void. It is actually not a data type, but it means that nothing will be returned. (In this case, we printed the message directly from the methods, so we didn&#39;t need to return anything.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Please feel free to comment and ask if you have any questions, your feedback will be greatly appreciated.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://coding-basics.blogspot.com/feeds/1599470220852932782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coding-basics.blogspot.com/2012/04/java-tutorial-lesson-6-understanding.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/1599470220852932782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/1599470220852932782'/><link rel='alternate' type='text/html' href='http://coding-basics.blogspot.com/2012/04/java-tutorial-lesson-6-understanding.html' title='Java Tutorial &amp; Lesson 6 - Making decisions with Conditionals'/><author><name>CodeMaster</name><uri>http://www.blogger.com/profile/15812391068093206919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9035447382718124967.post-4799208816241694967</id><published>2012-04-16T00:53:00.000-07:00</published><updated>2012-04-26T08:44:04.424-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="lesson"/><category scheme="http://www.blogger.com/atom/ns#" term="methods"/><category scheme="http://www.blogger.com/atom/ns#" term="programing"/><category scheme="http://www.blogger.com/atom/ns#" term="reusability"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Java Tutorial &amp; Lesson 5 - Understanding Methods and Attributes</title><content type='html'>&lt;h1&gt;





















 Understanding Java Methods&lt;/h1&gt;
&lt;br /&gt;
In order to create more complex programs that won&#39;t simply do some math (like the previous examples) we need to be able to organize out functions. Until now, we could simply write the whole program inside the main method, but that wouldn&#39;t be neither organized nor functional.&lt;br /&gt;
&lt;br /&gt;
Then, in order to write more advanced programs and code that we can use over and over again without re-writing&amp;nbsp;it each time, we will need to use Methods. Here is a small definition of the methods:&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;




















Java Methods:&lt;/h2&gt;
In object-oriented programming, a method is a subroutine (or procedure or function) associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time. Methods have the special property that at runtime, they have access to data stored in an instance of the class (or class instance or class object or object) they are associated with and are thereby able to control the state of the instance. (&lt;a href=&quot;http://en.wikipedia.org/wiki/Method_(computer_science)&quot; target=&quot;_blank&quot;&gt;Source&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
In practical terms, this means that we can use methods to group a set of operations. Let&#39;s try that in our project with a few easy examples:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;static int add(int a, int b) 
{  
    return a + b;
}
public static void main(String[] args) 
{
    int a = 3;
    int b = 2;
  
    int result = add( a, b );
  
    System.out.println( &quot;The answer is: &quot; + result );  
}
&lt;/pre&gt;
&lt;br /&gt;
Now we have created a simple method that will simply add two any numbers and return the result. This method&#39;s name is add(). The structure of a method is as shown in the example:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;static:&amp;nbsp;&lt;/b&gt;(since it isn&#39;t normally used, this will be explained later)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;int&lt;/b&gt;: is the returning type of the method.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;add&lt;/b&gt;: this is the name of the method. You can name it however you want, but preferably something related to what it actually does.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;(int a, int b)&lt;/b&gt;: this two elements inside the brackets are called the &lt;i&gt;parameters&lt;/i&gt; of the method. It means that in order to make this method work, we have to provide it with two elements (in this case of type &lt;i&gt;int&lt;/i&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Now we can use this method as many time as we want. This is called &lt;b&gt;reusability&lt;/b&gt;, which is the ability to perform some operation without writing the whole code again. For example we can write this inside the main method:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;int a = 5;
int b = 3;
int c = 7;
int d = 2;
  
int result = add( a, b );
System.out.println( &quot;The answer is: &quot; + result );
result = add( c, b ); //Notice that we already declared the variable &quot;result&quot;, so we don&#39;t have to declare it again (write int before the name)
System.out.println( &quot;The answer is: &quot; + result );
result = add( d, a );
System.out.println( &quot;The answer is: &quot; + result );
&lt;/pre&gt;
&lt;br /&gt;
&lt;h2&gt;













Java Attributes&lt;/h2&gt;
&lt;br /&gt;
The Java Attributes are just like variables, but they can be used in different places of the class, not just one method. This means that it is storing a value that can be used in different methods, thus making it actually a property of the class. The declaration of Java attributes is the same as the Java variables, but this time they are outside of the method, and are usually declared at the beginning of the code (after the &lt;b&gt;import&lt;i&gt;&lt;/i&gt;&lt;/b&gt; statements). Also, they should be declared with a availability property, which can be either private, public or protected (we will study these later). For now, let&#39;s just always set them as private.
&lt;br /&gt;
Let&#39;s see how we can use attributes using the last example:
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;private static int a=3;
private static int b=2;
static int add(int a, int b) 
{  
    return a + b;
}
public static void main(String[] args) 
{  
    int result = add( a, b );
  
    System.out.println( &quot;The answer is: &quot; + result );  
}
&lt;/pre&gt;
&lt;br /&gt;
As you see, there is no big change, but this little difference will help you be able to use a single &lt;i&gt;stored value&lt;/i&gt; throughout different functions or methods.
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
Now let&#39;s see a more complex example.&lt;br /&gt;
&lt;br /&gt;
Suppose that you have three groups of students, each one with three students, and you have to calculate the average of their final exam and the average of all the students. Normally you would have to add their results and divide them by the number of students. And you would have to do this 3 times. Let&#39;s simplify that with methods.&lt;br /&gt;
&lt;br /&gt;
First we need to know the results of the students. We can store these values in variables as the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public static void main(String[] args) 
{
    //First group
    double est11 = 3.5;
    double est12 = 2;
    double est13 = 4.5;
    //Second group
    double est11 = 3.7;
    double est12 = 5;
    double est13 = 4;
    //Third group
    double est11 = 3.3;
    double est12 = 2.1;
    double est13 = 4;
}
&lt;/pre&gt;
&lt;i&gt;&lt;u&gt;Note&lt;/u&gt;&lt;/i&gt;: Just in case, remember this is the main method and it should be inside a class (such as the one we created in previous lessons)
&lt;br /&gt;
&lt;br /&gt;
Now that they are stored in variables of type double, let&#39;s create the method that calculate the average of the results:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;static double average(double first, double second, double third) 
{
    double sum = first + second + third;
    return sum/3;
}
&lt;/pre&gt;
Now this method creates a variable called sum that adds the three values that it receives as &lt;i&gt;parameters&lt;/i&gt; (a,b and c).&amp;nbsp;Then it simply returns that result divided by 3 (the number of students).&lt;br /&gt;
&lt;br /&gt;
But we also want to calculate the total average of all the students. Since our method only takes 3 numbers at the time, we will have to create a new method to calculate this final result:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;//Lets declare an attribute here called: totalStudents
private static int totalStudents = 9;
static double average(double student1, double student2, double student3, double student4, double student5, double student6, double student7, double student8, double student9)
{
    double sum = student1+student2+student3+student4+student5+student6+student7+student8+student9;
    return sum/totalStudents;
}

&lt;/pre&gt;
The final program should look like this:



&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;private static int totalStudents = 9;

static double average(double student1, double student2, double student3, double student4, double student5, double student6, double student7, double student8, double student9)
{
    double sum = student1+student2+student3+student4+student5+student6+student7+student8+student9;
    return sum/totalStudents;
}

static double average(double first, double second, double third) 
{
    double sum = first + second + third;
    return sum/3;
}
public static void main(String[] args) 
{
    //First group
    double est11 = 3.5;
    double est12 = 2;
    double est13 = 4.5;
    double resultGroup1 = average( est11, est12, est13 );
    System.out.println( &quot;The average of the first group is: &quot; + resultGroup1 );
    //Second group
    double est21 = 3.7;
    double est22 = 5;
    double est23 = 4;
    double resultGroup2 = average( est21, est22, est23 );
    System.out.println( &quot;The average of the second group is: &quot; + resultGroup2 );
    //Third group
    double est31 = 3.3;
    double est32 = 2.1;
    double est33 = 4;
    double resultGroup3 = average( est31, est32, est33 );
    System.out.println( &quot;The average of the first group is: &quot; + resultGroup3 );
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;Please feel free to comment and ask if you have any questions, your feedback will be greatly appreciated.</content><link rel='replies' type='application/atom+xml' href='http://coding-basics.blogspot.com/feeds/4799208816241694967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coding-basics.blogspot.com/2012/04/in-order-to-create-more-complex.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/4799208816241694967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/4799208816241694967'/><link rel='alternate' type='text/html' href='http://coding-basics.blogspot.com/2012/04/in-order-to-create-more-complex.html' title='Java Tutorial &amp; Lesson 5 - Understanding Methods and Attributes'/><author><name>CodeMaster</name><uri>http://www.blogger.com/profile/15812391068093206919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9035447382718124967.post-5911312170353077890</id><published>2012-04-09T13:28:00.000-07:00</published><updated>2012-04-17T06:12:30.731-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="attributes"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="functions"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="lesson"/><category scheme="http://www.blogger.com/atom/ns#" term="programing"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Java Tutorial &amp; Lesson 4 - Understanding Variables and Data Types</title><content type='html'>&lt;h1&gt;






Java Variables and common Data types&lt;/h1&gt;
&lt;br /&gt;
OK I have spent longer than I thought in this level (already 4 parts!) but here we will finish learning the concepts of the lesson. Now we can start working with the basics of programming in Java. First let&#39;s define some concepts:&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;





Variables:&lt;/h2&gt;
In computer programming, a variable is a storage location and an associated symbolic name which contains some known or unknown quantity or information, a value. The variable name is the usual way to reference the stored value; this separation of name and content allows the name to be used independently of the exact information it represents.&lt;br /&gt;
Variables in programming may not directly correspond to the concept of variables in mathematics. The value of a computing variable is not necessarily part of an equation or formula as in mathematics. In computing, a variable may be employed in a repetitive process: assigned a value in one place, then used elsewhere, then reassigned a new value and used again in the same way. (&lt;a href=&quot;http://en.wikipedia.org/wiki/Variable_(programming)&quot; target=&quot;_blank&quot;&gt;Source&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
The way to do this in Java is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;int a = 2;
int b = 3;
  
int c = a + b;
&lt;/pre&gt;
&lt;br /&gt;
Here you are storing the values of numbers in the variables &lt;i&gt;a&lt;/i&gt; and &lt;i&gt;b&lt;/i&gt;, and then adding the values stored in &lt;i&gt;a&lt;/i&gt;&amp;nbsp;and &lt;i&gt;b&lt;/i&gt; and saving that result to the variable called &lt;i&gt;c&lt;/i&gt;. If you want to test this code, just write those lines of code inside the main method created before, and print the result (&lt;i&gt;println&lt;/i&gt;). The result would be like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public static void main(String[] args) 
{
    int a = 2;
    int b = 3;
 
    int result = a + b;
 
    System.out.println( &quot;The value now stored in result is: &quot; + result );  
}
&lt;/pre&gt;
&lt;br /&gt;
Note: Since Java is case sensitive, which means that if you call a variable something like &lt;i&gt;myvariable&lt;/i&gt;, and then try to obtain the value stored in it by calling &lt;i&gt;myVariable&lt;/i&gt;, you won&#39;t get the same result, make sure you keep the same name throughout the code. Again, Eclipse will warn you if you make this mistake, but still you should be careful.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;




Data Types&lt;/h2&gt;
In our previous example, we have stored a variable of type &lt;b&gt;int&lt;/b&gt;. This means that it can only contain values between&amp;nbsp;-2,147,483,648 (-2&lt;sup&gt;31&lt;/sup&gt;) and&amp;nbsp;2,147,483,647 (2&lt;sup&gt;31&lt;/sup&gt;-1). Some of the most common types of data that we can store in a variable are:&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table bgcolor=&quot;#FFFFFC&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
        &lt;tbody&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&lt;b&gt;Data Type&lt;/b&gt;&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&lt;b&gt;Default Value (for fields)&lt;/b&gt;&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&lt;b&gt;Minimum Range&lt;/b&gt;&lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&lt;b&gt;Maximum Range&lt;/b&gt;&lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&amp;nbsp;int&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;0&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;-2147483648&lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&amp;nbsp;+2147483647&lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&amp;nbsp;double&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;0.0d&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;4.94065645841246544e-324d&lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&amp;nbsp;1.79769313486231570e+308d&lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&amp;nbsp;char&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;&#39;\u0000&#39;&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;0&lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&amp;nbsp;65,535 (Unicode)&lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&amp;nbsp;boolean&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;false&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;NA&lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&amp;nbsp;NA&lt;/td&gt;
        &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Those are basically the basic Java types that we will use throughout this tutorial. They are the most commonly used because we can achieve many things with them. Some examples are:&lt;br /&gt;
&lt;br /&gt;
Example 1:
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;int a = 2;
int b = 3;
  
int c = a + b;  // Variable c becomes 5
&lt;/pre&gt;
&lt;br /&gt;
Example 2:
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;double a = 5.0;
int b = 2;
  
double c = a / b;  // Variable c becomes 2.5
&lt;/pre&gt;
&lt;br /&gt;
Example 3:
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;int num1 = 2;
int num2 = 3;
  
int c = num1 + num2;  // Variable c becomes 5.
&lt;/pre&gt;
&lt;br /&gt;
Example 4:
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;char first = &#39;a&#39;;
  
char second = (char)(first + 1);  // Variable second becomes b, since it is the next letter in the Unicode characters.
&lt;/pre&gt;
&lt;br /&gt;
Example 5:
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;boolean var1 = true;
boolean var2 = false;
  
boolean result = var1 &amp;amp;&amp;amp; var2;  // Variable result becomes false, we will discuss this later.
&lt;/pre&gt;
&lt;br /&gt;
Now let&#39;s try an example. Imagine that you have the information of one of your employees that just arrived from another country to work with you. This information includes: first name, last name, country of origin, and date of recruitment, job position.&lt;br /&gt;
Now, you have this information stored in variables, and you want to print a message that will greet him in his new job. The way to do this would be as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public static void main(String[] args) 
{
    //The information of the employee.
    String firstName = &quot;Chuck&quot;;
    String lastName = &quot;Norris&quot;;
    String country = &quot;Fight Land&quot;;

    int startingDay = 16;
    int startingMonth = 03;
    int startingYear = 2012;

    String jobPosition = &quot;Robot Engineer&quot;;
  
    //The message to display.
    System.out.println(&quot;Welcome to our company Mr &quot;+firstName+&quot; &quot;+lastName+&quot;.&quot;);
    System.out.println(&quot;&quot;);
    System.out.println(&quot;We are very pleased to receive you from &quot;+country+&quot; on the following date: &quot;+startingDay+&quot;/&quot;+startingMonth+&quot;/&quot;+startingYear+&quot;.&quot;);
    System.out.println(&quot;You will be working as an honorable &quot;+jobPosition+&quot;.&quot;);
    System.out.println(&quot;&quot;);
    System.out.println(&quot;Regards,&quot;);
    System.out.println(&quot;The Company.&quot;);

}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, if you are interested, here are some other types that we will not use in this tutorial but you will probably use as you become more expert in Java:&lt;br /&gt;
&lt;br /&gt;
&lt;table bgcolor=&quot;#FFFFFC&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
        &lt;tbody&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&lt;b&gt;Data Type&lt;/b&gt;&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&lt;b&gt;Default Value (for fields)&lt;/b&gt;&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&lt;b&gt;Minimum Range&lt;/b&gt;&lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&lt;b&gt;Maximum Range&lt;/b&gt;&lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&amp;nbsp;byte&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;0&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;-128&lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&amp;nbsp;+127&lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&amp;nbsp;short&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;0&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;-32768&lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&amp;nbsp;+32767&lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&amp;nbsp;long&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;0L&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;-9223372036854775808&lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&amp;nbsp;+9223372036854775807&lt;/td&gt;
        &lt;/tr&gt;
&lt;tr&gt;
          &lt;td width=&quot;17%&quot;&gt;&amp;nbsp;float&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;&amp;nbsp;0.0f&lt;/td&gt;
          &lt;td width=&quot;24%&quot;&gt;1.40129846432481707e-45 &lt;/td&gt;
          &lt;td width=&quot;25%&quot;&gt;&amp;nbsp;3.40282346638528860e+38 &lt;/td&gt;
        &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Please feel free to comment and ask if you have any questions, your feedback will be greatly appreciated.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://coding-basics.blogspot.com/feeds/5911312170353077890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coding-basics.blogspot.com/2012/04/level-0-getting-started-part-4-final.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/5911312170353077890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/5911312170353077890'/><link rel='alternate' type='text/html' href='http://coding-basics.blogspot.com/2012/04/level-0-getting-started-part-4-final.html' title='Java Tutorial &amp; Lesson 4 - Understanding Variables and Data Types'/><author><name>CodeMaster</name><uri>http://www.blogger.com/profile/15812391068093206919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9035447382718124967.post-7358126571951338660</id><published>2012-04-03T22:27:00.002-07:00</published><updated>2012-04-17T06:12:39.045-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="first program"/><category scheme="http://www.blogger.com/atom/ns#" term="hello world"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="lesson"/><category scheme="http://www.blogger.com/atom/ns#" term="programing"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Java Tutorial &amp; Lesson 3 - Writing the first program: Hello World!</title><content type='html'>&lt;h1&gt;






 Writing the &lt;i&gt;Hello World&lt;/i&gt; in Java&lt;/h1&gt;
&lt;br /&gt;
Once you have the environment set up, we can actually begin to code. In last part we set up the environment to work with Java and now we are ready to begin. Here is what you should have by now:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2mkKRbup6JHVzrFRPCBo6pZFj1IugohDtjMGyfDeYoMPx4JzloIA1mN_8wBgyhY7PD-1-RkDh0qphfuoDdJUOar9Gkh9v_iBM8RldQV74SRc3WHT-AWG0mSeb2y9MBVCKeMGOxh0Qg4D0/s1600/img7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2mkKRbup6JHVzrFRPCBo6pZFj1IugohDtjMGyfDeYoMPx4JzloIA1mN_8wBgyhY7PD-1-RkDh0qphfuoDdJUOar9Gkh9v_iBM8RldQV74SRc3WHT-AWG0mSeb2y9MBVCKeMGOxh0Qg4D0/s1600/img7.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The first line as you can see, says where are we located, this time we are located in a package called &quot;main&quot;. There can only be one line that defines the location of the Class for it can only be in one place at the time. The second line defines our class. A class is just a group of functions and attributes (that we will learn about later) all organized in one &quot;file&quot;.
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;



Create the main method&lt;/h2&gt;
Now, for the coding part write inside of the brackets the word &quot;main&quot; and press the &lt;i&gt;space bar&lt;/i&gt;&amp;nbsp;while holding the &lt;i&gt;Ctrl key&lt;/i&gt;. This is one of my favorite features of Eclipse and it is called Auto-completion. What it does is it gives you a list of possible words of set of words to complete what you are writing, saving you some time while programming. Now you should see something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZDRuWIUkWBOmvJT4JDmWKeLVBSv8u9xd4sS_DEg6CciGyrEK94Lys7bHOPFNIvM2idGrWUykJgev4oXAV6HVOIFksXjZSYqaHw4HvGhpUfzN_Cat3APP9D9RzlXk37EuDwx7e1d1RQU-F/s1600/img8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZDRuWIUkWBOmvJT4JDmWKeLVBSv8u9xd4sS_DEg6CciGyrEK94Lys7bHOPFNIvM2idGrWUykJgev4oXAV6HVOIFksXjZSYqaHw4HvGhpUfzN_Cat3APP9D9RzlXk37EuDwx7e1d1RQU-F/s640/img8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Select the option that says &quot;main method&quot;.&amp;nbsp;If you do it right you should now have something like:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public class Main 
{ 
    public static void main(String[] args) {
    //This is a comment. The contents will be here.
    }
}
&lt;/pre&gt;
&lt;br /&gt;
This method right here is the first method that will always be executed when running the program as a Java Application. Whatever there is inside those brackets will be the first lines executed by the Java compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;


Printing a message in the Console&lt;/h2&gt;
Now, to actually see something working, write the following line inside the main method:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public static void main(String[] args) // This is the main method.
{
    System.out.println( &quot;Hello Java!&quot; ); // Write this line.
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
and Run your program. To do this, Right-click on the main package in your Package explorer (left panel), Run As &amp;gt;&amp;gt; Java Application:&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9XyyJZUR5NohpQ4A2Aoyny_KZyPOQzEDyKTnrXJDzfmOyztv4_J-jmFSafd_QXVTpS8fn2_mhybDJ313MOKrvAppgQLHR5lMewCmrARiPEGm1gQuzUMu941MAAmS1EAFyJZK2SQ6kqgFB/s1600/img1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;612&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9XyyJZUR5NohpQ4A2Aoyny_KZyPOQzEDyKTnrXJDzfmOyztv4_J-jmFSafd_QXVTpS8fn2_mhybDJ313MOKrvAppgQLHR5lMewCmrARiPEGm1gQuzUMu941MAAmS1EAFyJZK2SQ6kqgFB/s640/img1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
And you should see something like this on the bottom panel. Make sure you are on the &quot;Console&quot; tab:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibn3nYdshJc1jmdJr5utGnVkOMnghTG95FbtCs5dB7Cb2k00H-opYvsvYSVmnB8OsYanQNdqfLwAfcfXjZyNax2EjJouzq8mDve3s-TS19exUhm-PfnMlHWBULTOp9wwAxSg-95K4kYMgS/s1600/img2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibn3nYdshJc1jmdJr5utGnVkOMnghTG95FbtCs5dB7Cb2k00H-opYvsvYSVmnB8OsYanQNdqfLwAfcfXjZyNax2EjJouzq8mDve3s-TS19exUhm-PfnMlHWBULTOp9wwAxSg-95K4kYMgS/s320/img2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Please feel free to comment and ask if you have any questions, your feedback will be greatly appreciated.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://coding-basics.blogspot.com/feeds/7358126571951338660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coding-basics.blogspot.com/2012/04/level-0-getting-started-part-3-final.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/7358126571951338660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/7358126571951338660'/><link rel='alternate' type='text/html' href='http://coding-basics.blogspot.com/2012/04/level-0-getting-started-part-3-final.html' title='Java Tutorial &amp; Lesson 3 - Writing the first program: Hello World!'/><author><name>CodeMaster</name><uri>http://www.blogger.com/profile/15812391068093206919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2mkKRbup6JHVzrFRPCBo6pZFj1IugohDtjMGyfDeYoMPx4JzloIA1mN_8wBgyhY7PD-1-RkDh0qphfuoDdJUOar9Gkh9v_iBM8RldQV74SRc3WHT-AWG0mSeb2y9MBVCKeMGOxh0Qg4D0/s72-c/img7.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9035447382718124967.post-9078157383589070332</id><published>2012-04-03T12:57:00.003-07:00</published><updated>2012-04-17T06:12:46.714-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="introduction"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="lesson"/><category scheme="http://www.blogger.com/atom/ns#" term="programing"/><category scheme="http://www.blogger.com/atom/ns#" term="project"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Java Tutorial &amp; Lesson 2 - Setting up a Project on Eclipse</title><content type='html'>&lt;h1&gt;






 Set up The Eclipse IDE for a Java Project&lt;/h1&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Once you have installed the required software, open the Eclipse IDE. Once started, it will ask you for a working directory. Select any empty directory and continue.&lt;br /&gt;
&lt;br /&gt;
Now let&#39;s get to the programming!&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;




How to create a Java Project&lt;/h2&gt;
Right-click the Package Explorer (Left Panel of Eclipse) and create a new Java Project:&lt;br /&gt;
&lt;br /&gt;
(Note: if you can&#39;t see any of the panels mentioned here, just go to Window&amp;gt;&amp;gt; Show View and select the missing panel. You can also relocate it by dragging and dropping wherever you want)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkh8JKwkJ2V0dwl7t_B3wdDJDqMJE0DEEvOqAcXpk1wjwdhEArPS8RPiYCz2Q3RizqfPYs4F0WKARF7E1gwtmGyefxW5G9TASx8Te5mIwFYRAvlcneUgRIaQdLeGDQu1gsmtZE7cCrApWD/s1600/img1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;552&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkh8JKwkJ2V0dwl7t_B3wdDJDqMJE0DEEvOqAcXpk1wjwdhEArPS8RPiYCz2Q3RizqfPYs4F0WKARF7E1gwtmGyefxW5G9TASx8Te5mIwFYRAvlcneUgRIaQdLeGDQu1gsmtZE7cCrApWD/s640/img1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In the next menu I recommend no using the default location (it&#39;s just a personal preference) but instead saving your project to a different folder, this way you can keep all your projects organized:&lt;/div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNoYLvtqDEYdBWqiSXknCPXsfvJPo9qhk08kAlROlESN8TY_cixP0Um5qZyOOulsnl4Tvrg9ttf7OXxYgkP7nEgPXKJajqji0giFiitkE3BeScsY5ikMi2niN5ZXFxL9Ctj6f-X4s5ajTe/s1600/img2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNoYLvtqDEYdBWqiSXknCPXsfvJPo9qhk08kAlROlESN8TY_cixP0Um5qZyOOulsnl4Tvrg9ttf7OXxYgkP7nEgPXKJajqji0giFiitkE3BeScsY5ikMi2niN5ZXFxL9Ctj6f-X4s5ajTe/s640/img2.png&quot; width=&quot;531&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Click next and again you can modify some of the specifics of the project. This time Check &quot;Allow output folders for source folders&quot; and click finish:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr2hg4yyJUUR59grLroy6SFY5kApP8VvhDs1_FS8tuJnmj7CsQ-I-30CkNzJM1jMSn8u0M8HBKASKKBUH1tEb7g5JGuaM9a5GwH5KaiyFFP6MCzWdfOsJ-q6I_lcvHdP0IQWlLEajERaz1/s1600/img3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr2hg4yyJUUR59grLroy6SFY5kApP8VvhDs1_FS8tuJnmj7CsQ-I-30CkNzJM1jMSn8u0M8HBKASKKBUH1tEb7g5JGuaM9a5GwH5KaiyFFP6MCzWdfOsJ-q6I_lcvHdP0IQWlLEajERaz1/s640/img3.png&quot; width=&quot;564&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;


How to Create a Package and a Java Class&lt;/h2&gt;
Now that we have a Java project, right-click on the &lt;i&gt;&lt;b&gt;src&lt;/b&gt;&lt;/i&gt; folder (the src or &quot;source&quot; folder will contain all our source code) and create a new package. This is for organization purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijFOvQh9mV9srtgqfRWHNfAwgYqcG86muWn-MvamSm75tWz1VDEQNnMGfTMBQR8vuGVq4KFZH_cCNIRnpE4HH7tTAcNv8LXyY_FqkGxv4JDnc-0ZFZ28PNhfh-vm0XLPYR5xP8G3OOexL_/s1600/img4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;380&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijFOvQh9mV9srtgqfRWHNfAwgYqcG86muWn-MvamSm75tWz1VDEQNnMGfTMBQR8vuGVq4KFZH_cCNIRnpE4HH7tTAcNv8LXyY_FqkGxv4JDnc-0ZFZ28PNhfh-vm0XLPYR5xP8G3OOexL_/s640/img4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Name it however you want, but remember that it should start with a non-capital letter to follow the Java Standards (this will make your code more readable to other programmers). Some suggestions are: &quot;main&quot; (maybe too generic), &quot;world&quot;, &quot;gui&quot; (for Graphic User Interface). I will go with &lt;i&gt;main&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Create a new Class by right-clicking your new package as shown in the image below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7w5byQTb3veshgak1I1eaB6lftzJ2MsMLePhbKe-YiiVtLk9zdkIqZ7QEN8mRja7ZIvR7pNpxlh9jVIjcGY28xNyXNILyjNA4dwLBEBWxhIQgI1FnUgtTFeWqqMyIvoCNtQV_TGTYxsLv/s1600/img5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;385&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7w5byQTb3veshgak1I1eaB6lftzJ2MsMLePhbKe-YiiVtLk9zdkIqZ7QEN8mRja7ZIvR7pNpxlh9jVIjcGY28xNyXNILyjNA4dwLBEBWxhIQgI1FnUgtTFeWqqMyIvoCNtQV_TGTYxsLv/s640/img5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Again you can name it however you want, this time it should start with a capital letter. Don&#39;t worry if you forget these Java standards because Eclipse will remind you and suggest you to change it if you do so:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBQc1H3EBv8_wS7ZeHfKtXdr4eUHN9RKVlm8-usPUdaEeLLW4vNuRkK1UoR9C8L8n7fvTgo8AzVqM_4nJUe25OR4_EH9df4IaElMsm4X5Nk9K4vdxhdn5cNLdQp9QxVFDDQcFXAOEkl7eo/s1600/img9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;144&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBQc1H3EBv8_wS7ZeHfKtXdr4eUHN9RKVlm8-usPUdaEeLLW4vNuRkK1UoR9C8L8n7fvTgo8AzVqM_4nJUe25OR4_EH9df4IaElMsm4X5Nk9K4vdxhdn5cNLdQp9QxVFDDQcFXAOEkl7eo/s640/img9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Some suggested names are &quot;MyFirstClass&quot;, &quot;MainClass&quot; or even &quot;HelloJava&quot;. Again I will go with just &quot;Main&quot; (I like to keep it simple for small projects like this).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR7omLrgFqxsJ52X7JtQOl1ImwnvxJ5TojJSPyFXUxAIlYmdR7J0MrPpy-vJX1ZTKvw9h1WN8Uwz3V3VhKSJW2y8kznqOo_8QBm_rkQt5S4uMVf6ItXDpFjgZQ-sgfUrDscQIA4JPczqRa/s1600/img6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR7omLrgFqxsJ52X7JtQOl1ImwnvxJ5TojJSPyFXUxAIlYmdR7J0MrPpy-vJX1ZTKvw9h1WN8Uwz3V3VhKSJW2y8kznqOo_8QBm_rkQt5S4uMVf6ItXDpFjgZQ-sgfUrDscQIA4JPczqRa/s640/img6.png&quot; width=&quot;542&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
So here we have our first Java code. These three lines are the first lines you will see depending on the name of the package and the name of the class that you chose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2mkKRbup6JHVzrFRPCBo6pZFj1IugohDtjMGyfDeYoMPx4JzloIA1mN_8wBgyhY7PD-1-RkDh0qphfuoDdJUOar9Gkh9v_iBM8RldQV74SRc3WHT-AWG0mSeb2y9MBVCKeMGOxh0Qg4D0/s1600/img7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2mkKRbup6JHVzrFRPCBo6pZFj1IugohDtjMGyfDeYoMPx4JzloIA1mN_8wBgyhY7PD-1-RkDh0qphfuoDdJUOar9Gkh9v_iBM8RldQV74SRc3WHT-AWG0mSeb2y9MBVCKeMGOxh0Qg4D0/s1600/img7.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Please feel free to comment and ask if you have any questions, your feedback will be greatly appreciated.&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://coding-basics.blogspot.com/feeds/9078157383589070332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coding-basics.blogspot.com/2012/04/level-0-getting-started-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/9078157383589070332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/9078157383589070332'/><link rel='alternate' type='text/html' href='http://coding-basics.blogspot.com/2012/04/level-0-getting-started-part-2.html' title='Java Tutorial &amp; Lesson 2 - Setting up a Project on Eclipse'/><author><name>CodeMaster</name><uri>http://www.blogger.com/profile/15812391068093206919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkh8JKwkJ2V0dwl7t_B3wdDJDqMJE0DEEvOqAcXpk1wjwdhEArPS8RPiYCz2Q3RizqfPYs4F0WKARF7E1gwtmGyefxW5G9TASx8Te5mIwFYRAvlcneUgRIaQdLeGDQu1gsmtZE7cCrApWD/s72-c/img1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9035447382718124967.post-8733772593371268028</id><published>2012-03-30T02:09:00.000-07:00</published><updated>2012-04-17T06:12:57.906-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="introduction"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="lesson"/><category scheme="http://www.blogger.com/atom/ns#" term="Object oriented programing"/><category scheme="http://www.blogger.com/atom/ns#" term="programing"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Java Tutorial &amp; Lesson 1 - Getting Started</title><content type='html'>&lt;h1&gt;




 Introduction to Java and Eclipse IDE&lt;/h1&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;At the end of this level the reader will be able to:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;Explain the global process of solution to a problem using a computer program. This includes the steps that must be followed to solve it and the different elements that should be produced while the solution is build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;Analyze a simple problem to be solved using a computer program, building a model with the elements involved in the problem and specifying the services the program must offer.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;Explain the structure of a computer program and the role played by each of the&amp;nbsp;elements&amp;nbsp;that compose it.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;Complete a partial solution to a problem (an incomplete program written in Java language), using simple expressions, method assignments and invocations. This implies understanding the concept of parameter and object creation.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;Use a software development environment and a predefined workspace, to complete a partial solution to a problem.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;So let&#39;s get started...&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;


Download and Install The Java Development Kit (JDK)&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;First you need to download and install the &lt;/span&gt;&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads&quot; style=&quot;font-family: arial, sans-serif;&quot; target=&quot;_blank&quot;&gt;Java Development Kit&lt;/a&gt;&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt; (JDK) for your Operating System. I would recommend downloading the latest version available.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/index.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/347320.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;


Download and Install The Eclipse IDE&lt;/h2&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;We also need an Integrated Development Environment (IDE) which will help you make the coding experience much more better. I highly&amp;nbsp;recommend&amp;nbsp;&lt;a href=&quot;http://www.eclipse.org/downloads/&quot; target=&quot;_blank&quot;&gt;Eclipse IDE for Java Developers&lt;/a&gt;&amp;nbsp;because it&#39;s very intuitive and will help you have a faster learning curve.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.eclipse.org/downloads/&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.eclipse.org/eclipse.org-common/themes/Nova/images/eclipse.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;For the Java version y would recommend the latest version because it usually has more functionality and ease of use.&amp;nbsp;The Java language has undergone several changes since JDK 1.0 as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4, the evolution of the Java language has been governed by the Java Community Process (JCP), which uses Java Specification Requests (JSRs) to propose and specify additions and changes to the Java platform. Remember that currently the versions are&amp;nbsp;preceded&amp;nbsp;by a &quot;1.&quot;, meaning that, for example, the 5th version is the version 1.5 and the 6th version the 1.6 and so on.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;I personally recommend Eclipse for it is with this IDE that I learnt Java. At first it can be a little complicated because it has many options and menus but if you only focus on the important (coding) and once you get used to it you will write programs very fast. Some people wrongly state that Eclipse is only for Java development but actually the Eclipse Platform is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written mostly in Java. By means of various plug-ins, it can be used to develop applications in various programming languages including Ada, C, C++, COBOL, Erlang, Java, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure, Groovy and Scheme. It can also be used to develop packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others. [&lt;a href=&quot;http://en.wikipedia.org/wiki/Eclipse_(software)&quot; target=&quot;_blank&quot;&gt;ref&lt;/a&gt;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;(Note: If you are already familiar with Eclipse you can skip the &lt;i&gt;&lt;b&gt;Java Tutorial and Lesson 2&lt;/b&gt;&lt;/i&gt; and go straight to the&amp;nbsp;&lt;/span&gt;&amp;nbsp;
&lt;i style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;b&gt;Jav&lt;/b&gt;&lt;/i&gt;&lt;i style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;b&gt;a Tutorial and Lesson&lt;/b&gt;&lt;/i&gt;&amp;nbsp;&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&amp;nbsp;3)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Please feel free to comment and ask if you have any questions, your feedback will be greatly appreciated.&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://coding-basics.blogspot.com/feeds/8733772593371268028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coding-basics.blogspot.com/2012/03/oop1-level-1.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/8733772593371268028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9035447382718124967/posts/default/8733772593371268028'/><link rel='alternate' type='text/html' href='http://coding-basics.blogspot.com/2012/03/oop1-level-1.html' title='Java Tutorial &amp; Lesson 1 - Getting Started'/><author><name>CodeMaster</name><uri>http://www.blogger.com/profile/15812391068093206919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>