Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,296 members, 7,818,996 topics. Date: Monday, 06 May 2024 at 09:46 AM

Java Made Easy -learn Java Programing Here [ Code Name "Class One The Basics"] - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Java Made Easy -learn Java Programing Here [ Code Name "Class One The Basics"] (971 Views)

How To Create A Simple Calculator Using Java Programing Language GUI / Please Post All Your Java Programing Questions Here. (2) (3) (4)

(1) (Reply)

Java Made Easy -learn Java Programing Here [ Code Name "Class One The Basics"] by Weezyval(m): 5:40pm On Nov 26, 2014
JAVA MADE EASY -LEARN JAVA PROGRAMING HERE
+++++++++++++++++++++++++++++++++++++++++


This free online course is for those wishing to learn the Java programming language. It is aimed at complete beginners to the subject, and no knowledge is assumed. The software you need to do the course is set out below, in the "What you need to get started" link. Once you have downloaded everything you need, We start the tutorials



Getting Started



One of the difficult things about getting started with Java is installing everything you need. Even before you write a single line of code, the headaches begin! Hopefully, the following sections will make life easier for you.

We're going to write all our code using a free piece of software called NetBeans. This is one of the most popular IDEs (Interface Development Environment) in the world for writing Java programmes. You'll see what it looks like shortly. But before NetBeans will work, it needs you to install the necessary Java components and files. First up is something called the Java Virtual Machine.
The Java Virtual Machine

Java is platform independent. This means that it will run on just about any operating system. So whether your computer runs Windows, Linux, Mac OS, it's all the same to Java! The reason it can run on any operating system is because of the Java Virtual Machine. The Virtual Machine is a programme that processes all your code correctly. So you need to install this programme (Virtual Machine) before you can run any Java code.

Java is owned by a company called Sun Microsystems, so you need to head over to Sun's website to get the Java Virtual Machine, also known as the Java Runtime Environment (JRE). Try this page first:

http://java.com/en/download/index.jsp

You can check to see if you already have the JRE on your computer by clicking the link "Do I have Java?". You'll find this link under the big Download button at the top of the page. (Unless Sun have changed things around, again!) When you click the link, your computer will be scanned for the JRE. You will then be told whether you have it or not. If not, you'll be given the opportunity to download and install it.

Or you could just head over to this page:

http://java.com/en/download/manual.jsp

The "manual" in the above links means "manual download". The page gives you download links and instructions for a wide variety of operating systems.

After downloading and installing, you may need to restart you computer. When you do, you will have the Java Virtual Machine.

The Java Software Development Kit

At this stage, you still can't write any programmes. The only thing you've done is to install software so that Java programmes can be run on your computer. To write code and test it out, you need something called a Software Development kit.

Java's Software Development Kit can currently be downloaded from here:

http://developers.sun.com/downloads/

The one we're going to be using is called Java SE. (The SE stands for Standard Edition.). Click on that link, then on "Java SE (JDK) 6 Download". You'll then find yourself on a page with a bewildering list of options to download. Because we're going to be using NetBeans, locate this:

JDK 8 with NetBeans 8

Click the Download link to be taken to yet another page. Click the top download to be taken to a page that asks you to select your operating system. Click Continue to finally get the download you need. A word of warning, though - this download will be big, at over a 130 megabytes at the time of writing! Once you've downloaded the JDK and NetBeans, install it on your computer.

We're going to be using NetBeans to write our code. Before launching the software, however, here's how things work in the world of Java.


How things work in Java


You write the actual code for your programmes in a text editor. (In NetBeans, there's a special area for you to write code.) The code is called source code, and is saved with the file extension .java. A programme called Javac is then used to turn the source code into Java Byte Code. This is known as compiling. After Javac has finished compiling the Java Byte Code, it creates a new file with the extension .class. (At least, it does if no errors are detected.) Once the class file has been created, it can be run on the Java Virtual Machine. So:

Create source code with the extension .java
Use Javac to create (compile) a file ending in .class
Run the compiled class

NetBeans handles all the creating and compiling for you. Behind the scenes, though, it takes your sources code and creates the java file. It will launch Javac and compile the class file. NetBeans can then run your programme inside its own software. This saves you the hassle of opening up a terminal window and typing long strings of commands,
Now that you have a general idea of how Java works, launch your NetBeans software. Class Two Coming soon!

1 Like 1 Share

Re: Java Made Easy -learn Java Programing Here [ Code Name "Class One The Basics"] by trytillmake(m): 10:04am On Dec 02, 2014
i think one of the best books to lean java is "Learn to Program with Java: by John Smiley" (google it)

It is taught by a Prof, as if u are the classroom, i aint a java person (but have c# experience) but when i picked up the book i had insight to java in 24hrs

(1) (Reply)

Computer Based Testing Using Existing Open Source Solutions / Where Can I Get Java Real Questions To Enchace Ma Performance / Why Is It Difficult To Send Media Through Whatsapp Sometimes?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 20
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.