Learn Java Programming Here Easily

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 24, 2009, 09:58 PM
432096 members and 299073 Topics
Latest Member: coataling
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Programming  |  Learn Java Programming Here Easily
Pages: (1) (2) (3) Go Down Send this topic Notify of replies
Author Topic: Learn Java Programming Here Easily  (Read 2160 views)
okunade (m)
Learn Java Programming Here Easily
« on: March 01, 2009, 06:10 PM »

 Smiley Cheesy
I will teach java program step by step. No programming knowledge is required. Just get JDK 5 or higher installed on your computer. This can be downloaded from www.java.sun.com/downloads
nerdylarry
Re: Learn Java Programming Here Easily
« #1 on: March 01, 2009, 06:47 PM »

Ride on G! We are damn eager to sit and learn.

God bless ya!!!
okunade (m)
Re: Learn Java Programming Here Easily
« #2 on: March 01, 2009, 07:53 PM »

LESSON ONE,
Java is a programming Language developed by Sun Microsystem ltd 1995,   [/i]note[i]
here we are not going to talk too much,  no story
After the first section of the course leaners should be able to write simple but functional programming.

First requirement is to download the Java jdk 5.0 and above and get it install on our computer, it is free just go to www.java.sun.com
If u dont have JDK(Java Development Kits) u wont be able to compile,debug, or run your program,
debeginin
java database help
« #3 on: March 02, 2009, 04:57 AM »

I want to learn java database programming but don't know how to
configure my platform to get started.
please I need you to show me how.
Thanks.
okunade (m)
Re: Learn Java Programming Here Easily
« #4 on: March 02, 2009, 07:03 AM »

very easy to start but you will need to download some packages from sun website given above after you must have installed the JDK. Go to www.java.sun.com/downloads then download J2DB base on your platform,
geek4ever
Re: Learn Java Programming Here Easily
« #5 on: March 02, 2009, 08:05 PM »

What type of java programming tutorials are you able to offer? Applications or Applets? are you a java programmer? is java the only computer language you code in?

Just being inquisitive mate!  Smiley
okunade (m)
Re: Learn Java Programming Here Easily
« #6 on: March 04, 2009, 11:33 AM »

Quote from: geek4ever on March 02, 2009, 08:05 PM
What type of java programming tutorials are you able to offer? Applications or Applets? are you a java programmer? is java the only computer language you code in?

Just being inquisitive mate! Smiley

Both Applications and Applets. Not only Java but also C++,Python,C, and Fortran2003
okunade (m)
Re: Learn Java Programming Here Easily
« #7 on: March 04, 2009, 11:48 AM »

LESSON TWO Smiley
     We are going to be looking at Java Applications, Applets, and Database Connectivity.
Before we continue, we are going to talk about various IDE(Integrated Development Environment) to write, compile, and run our java program.
     The best IDE I will recommend is JCreator which can be downloaded from www.jcreator.com.
   The Advantage of this software is to enable us to feel the fonts, and colours the text gives us. After you have installed the JCreator software. The we can Continue our program,
azpunpin
Re: Learn Java Programming Here Easily
« #8 on: March 04, 2009, 09:21 PM »

Downloaded. Lets start the tutorial.

jacob05 (m)
Re: Learn Java Programming Here Easily
« #9 on: March 05, 2009, 03:22 PM »

@azpunpin
This IDE is not free , where do you get your's do you pay for it ,because i need one.
okunade (m)
Re: Learn Java Programming Here Easily
« #10 on: March 05, 2009, 04:10 PM »

Quote from: jacob05 on March 05, 2009, 03:22 PM
@azpunpin
This IDE is not free , where do you get your's do you pay for it ,because i need one.

The IDE can be downloaded free of charge, but that is trial version. If you need the Licence key, you will pay for it. It cost only $51.50. so if you need it just send mail to guessy2k2@yahoo.com
OK
The Trial Version is for just 30 days only thanks,
okunade (m)
Re: Learn Java Programming Here Easily
« #11 on: March 05, 2009, 04:34 PM »

LESSON 3

Myfirst Java Program,
Open the text editor in your IDE. Write the following code,
========================================================
public class myFirstProg {
    public static void main(String args[]) {
       system.out.println("Welcome to Java World!, \nThis is my first program);
   }
}
=========================================================
We are using JCreator software(if u dont have one already, download it at www.jcreator.com) to run this program, save your text as myFirstProg.java
press F5,
wait for response, that's all.
----------------------------------------------------
Explanation of the program:
line 1: public class myFirstProg {
this is class definition. the first thing in Java program is to define your class and the name of your class must be the same as the name of your program(Here the class name is myFirstProg which must be the same as the name of your text file)
Also our class is define as public(you will know this later on)
A right curly { bracket is used to open the program,
To be Continued,
jacob05 (m)
Re: Learn Java Programming Here Easily
« #12 on: March 05, 2009, 05:52 PM »

@okunade
Pls i need the ide {full version}.
Bossman (m)
Re: Learn Java Programming Here Easily
« #13 on: March 05, 2009, 07:52 PM »

Just a small addition regarding an IDE. I normally would not recommend a beginner use and IDE ( I always suggest textpad). But, if you cannot get a hold of the already suggested one, eclipse is another free IDE that is quite good.
Omoosedabi
Re: Learn Java Programming Here Easily
« #14 on: March 06, 2009, 01:31 AM »

Where can we get eclipse
Bossman (m)
Re: Learn Java Programming Here Easily
« #15 on: March 06, 2009, 02:29 AM »

Just google for it. You can also get it from other mirror sites.

http://www.eclipse.org/downloads/

Quote from: Omoosedabi on March 06, 2009, 01:31 AM
Where can we get eclipse
ade2kay (m)
Re: Learn Java Programming Here Easily
« #16 on: March 06, 2009, 08:22 AM »

Quote from: okunade on March 05, 2009, 04:10 PM
The IDE can be downloaded free of charge, but that is trial version. If you need the Licence key, you will pay for it. It cost only $51.50. so if you need it just send mail to guessy2k2@yahoo.com

Naija !   Wink


Quote from: Bossman on March 05, 2009, 07:52 PM
I normally would not recommend a beginner use and IDE ( I always suggest textpad).

Best post so far !  Cool


dammytosh
Re: Learn Java Programming Here Easily
« #17 on: March 06, 2009, 01:57 PM »

Quote from: okunade on March 05, 2009, 04:34 PM
  A right curly { bracket is used to open the program,
That is a left Brace (Curly Bracket) and that a "{" is used to open the program in java is absurd. what is the  "{" after the main method doing ?


ade2kay (m)
Re: Learn Java Programming Here Easily
« #18 on: March 06, 2009, 04:29 PM »

Quote from: dammytosh on March 06, 2009, 01:57 PM
and that a "{" is used to open the program in java is absurd. what is the "{" after the main method doing ?
It is used to open the "main program" too, because main is a program on its own  Grin Grin
javaprince (m)
Re: Learn Java Programming Here Easily
« #19 on: March 08, 2009, 10:32 AM »

Good intentions. But there is really no point re-inventing the wheel. Also, am an open source advocate, the part of people having to pay for JCreator makes me frown. There are so many free, arguably better IDEs one that easily comes to mind is Netbeans 6.5 IDE from www.netbeans.org.

And like a friend said earlier, what does a beginner need an IDE for? It just makes matters complicated and bogous. So just download Textpad for free or if your on Linux try using vim editor or notepad for windows.
fatezy (m)
Re: Learn Java Programming Here Easily
« #20 on: March 08, 2009, 12:32 PM »

I wouldn't say IDE's are bad, they make programmin easier and more enjoyable though, makes you a lazy programmer
azpunpin
Re: Learn Java Programming Here Easily
« #21 on: March 08, 2009, 12:47 PM »

I downloaded the Jcreator free of charge from their website. I even downloaded the Pro Version.

http://www.jcreator.com/download.htm

One Love
azpunpin
Re: Learn Java Programming Here Easily
« #22 on: March 08, 2009, 12:56 PM »

Quote from: okunade on March 05, 2009, 04:34 PM
LESSON 3

Myfirst Java Program,
Open the text editor in your IDE. Write the following code,
========================================================
public class myFirstProg {
 public static void main(String args[]) {
 system.out.println("Welcome to Java World!, \nThis is my first program);
 }
}
=========================================================
We are using JCreator software(if u dont have one already, download it at www.jcreator.com) to run this program, save your text as myFirstProg.java
press F5,
wait for response, that's all.
----------------------------------------------------
Explanation of the program:
line 1: public class myFirstProg {
this is class definition. the first thing in Java program is to define your class and the name of your class must be the same as the name of your program(Here the class name is myFirstProg which must be the same as the name of your text file)
Also our class is define as public(you will know this later on)
A right curly { bracket is used to open the program,
To be Continued,


In the tutorial, there was an error which should be corrected,  You should close this line up system.out.println("Welcome to Java World!, \nThis is my first program);

This line will print the message but the message should be closed also which should be ("Welcome to Java World!, \nThis is my first program");

If not closed with ", there will be an error when running it.

I hope am a good Learner,  Go on Tutor. I hope we understand better soon.
azpunpin
Re: Learn Java Programming Here Easily
« #23 on: March 08, 2009, 02:15 PM »

I need help, i was learning more on java and i reach the part import java.util.Scanner

I tried to use the code to sum up 2 integer but i keep having problem when compiling it with both Jcreator and Command Prompt.

Anybody to fix it up for me Plzzzzzzzz!!

One Love


* Tutorial.JPG (129.26 KB, 1024x768 )
jacob05 (m)
Re: Learn Java Programming Here Easily
« #24 on: March 08, 2009, 07:43 PM »

Quote from: okunade on March 05, 2009, 04:34 PM
LESSON 3

Myfirst Java Program,
Open the text editor in your IDE. Write the following code,
========================================================
public class myFirstProg {
    public static void main(String args[]) {
       system.out.println("Welcome to Java World!, \nThis is my first program);
   }
}
=========================================================
We are using JCreator software(if u dont have one already, download it at www.jcreator.com) to run this program, save your text as myFirstProg.java
press F5,
wait for response, that's all.
----------------------------------------------------
Explanation of the program:
line 1: public class myFirstProg {
this is class definition. the first thing in Java program is to define your class and the name of your class must be the same as the name of your program(Here the class name is myFirstProg which must be the same as the name of your text file)
Also our class is define as public(you will know this later on)
A right curly { bracket is used to open the program,
To be Continued,
Shouldn't it be public static void main(String[] args)
sirlisir
Re: Learn Java Programming Here Easily
« #25 on: March 08, 2009, 08:22 PM »

In java it doesnt matter the way you declare an array , it can be "String [] args" or "String args[]", they're both the same. However in c++ it does matters. You only declare arrays this way : " string s [].
javaprince (m)
Re: Learn Java Programming Here Easily
« #26 on: March 10, 2009, 12:12 PM »

First of all you don't need to paste snapshots just because you want people to point out errors. Better if you paste the source code and then Compiler error as text/code.

From the above, its fairly obvious the Scanner class was spelt wrongly as Java is case-sensitive it wouldn't compile. Also, there should be a semicolon after your main method body definition.


Its JAND, Its Niger!!! (www.naijadukes.net)
okunade (m)
Re: Learn Java Programming Here Easily
« #27 on: March 10, 2009, 01:37 PM »

Thanks House.
I've many issues to clear,
but firstly Im very sorry that I didn't post since thursday,

1. About the IDE,  I said IDE is free and can be downloaded free of charge. But in case of those who are asking for the licence I ask them to get it from the site or mail me.Clear(ade2kay)

2. About using textpad, there is no compulsion in using IDE You can use textpad but using any IDE will make your program look nicely, and you can run your program by just clicking a button.(Note any IDE can be used, just go to google and write "free java IDE")

3. Thanks azpumpin it was a mistake the line is ("Welcome to Java World!, \nThis is my first program");

4. { is used to open the program and also is also used to open any method you use in your program. the method used is main method so for main method you will need to open { for it

5. As for now Declaring any class or method public should be accepted until Chapter that described (Method--private,public,protected)

6. importing a scanner class should be done when writting from a keyboard, to a file etc
this is how it should be done
 
              import java.util.*;
              import java.io.*;

Scanner class is in the java utility package so when you need it just iport the whole package by ( import java.util.*Wink

7. summing up two integers

     
       
       import java.util.*;
       import java.io.*;

  public class Addition {
     public static void main(String args[])
   // can also be written as String []args, you will understand better when doing Array.
  {
   Scanner kb = new Scanner(System.in); // make Scanner object kb
   int firstValue, secondValue; // Declaring variable
   int sum;
   System.out.print("Enter the first value : ");
   firstValue = kb.nextInt;
   System.out.print("Enter the second value : ");
   secondValue = kb.nextInt;
 
   sum = firstValue + secondValue;
   System.out.println("The result is "+sum);
   }
}
That is it,
one house,
azpunpin
Re: Learn Java Programming Here Easily
« #28 on: March 10, 2009, 06:10 PM »

Thanks Okunade and thanks 2 JavaPrince as well.

I am still having problem with the codes, this is what it states:


C:\Projects\nairaland\src>javac Addition.java
Addition.java:8: cannot resolve symbol
symbol  : class Scanner
location: class Addition
   Scanner kb= new Scanner (System.in);
   ^
Addition.java:8: cannot resolve symbol
symbol  : class Scanner
location: class Addition
   Scanner kb= new Scanner (System.in);
                   ^
2 errors


MY CODE


 import java.util.*;
       import java.io.*;

  public class Addition {
     public static void main(String args[])
   
  {
   Scanner kb = new Scanner(System.in);
   int firstValue, secondValue;
   int sum;
   System.out.print("Enter the first value : ");
   firstValue = kb.nextInt;
   System.out.print("Enter the second value : ");
   secondValue = kb.nextInt;
 
   sum = firstValue + secondValue;
   System.out.println("The result is "+sum);
   }
}




Kindly help Plz.

One Love.
Bossman (m)
Re: Learn Java Programming Here Easily
« #29 on: March 10, 2009, 06:35 PM »

Which JDK version are you using? The Scanner class is part of JDK 1.5 and up.

Quote from: azpunpin on March 10, 2009, 06:10 PM
Thanks Okunade and thanks 2 JavaPrince as well.

I am still having problem with the codes, this is what it states:


C:\Projects\nairaland\src>javac Addition.java
Addition.java:8: cannot resolve symbol
symbol  : class Scanner
location: class Addition
   Scanner kb= new Scanner (System.in);
   ^
Addition.java:8: cannot resolve symbol
symbol  : class Scanner
location: class Addition
   Scanner kb= new Scanner (System.in);
                   ^
2 errors


MY CODE


 import java.util.*;
 import java.io.*;

 public class Addition {
 public static void main(String args[])
 
 {
 Scanner kb = new Scanner(System.in);
 int firstValue, secondValue;
 int sum;
 System.out.print("Enter the first value : ");
 firstValue = kb.nextInt;
 System.out.print("Enter the second value : ");
 secondValue = kb.nextInt;
 
 sum = firstValue + secondValue;
 System.out.println("The result is "+sum);
 }
}




Kindly help Plz.

One Love.
azpunpin
Re: Learn Java Programming Here Easily
« #30 on: March 10, 2009, 07:24 PM »

Thanx Bossman,  I am currently using JDK1.6.0_11

One Love.
Bossman (m)
Re: Learn Java Programming Here Easily
« #31 on: March 10, 2009, 07:58 PM »

Did you have a previous version of the JDK, if so may be you are still pointing to that one. To verify that you are actually getting to the Scanner class, try this on the import and see if you get an error.

import java.util.Scanner;
 Let's Develop A Content Management System (CMS)  Passing Business Object Between Dal And Bll   My Software Development Journey  Page 2
Pages: (1) (2) (3) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.