|
okunade (m)
|
 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
|
Ride on G! We are damn eager to sit and learn.
God bless ya!!!
|
|
|
|
|
|
okunade (m)
|
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.comIf u dont have JDK(Java Development Kits) u wont be able to compile,debug, or run your program,
|
|
|
|
|
|
debeginin
|
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)
|
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
|
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! 
|
|
|
|
|
|
okunade (m)
|
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!  Both Applications and Applets. Not only Java but also C++,Python,C, and Fortran2003
|
|
|
|
|
|
okunade (m)
|
LESSON TWO  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
|
Downloaded. Lets start the tutorial.
|
|
|
|
|
|
jacob05 (m)
|
@azpunpin This IDE is not free , where do you get your's do you pay for it ,because i need one.
|
|
|
|
|
|
okunade (m)
|
@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.comOK The Trial Version is for just 30 days only thanks,
|
|
|
|
|
|
okunade (m)
|
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)
|
@okunade Pls i need the ide {full version}.
|
|
|
|
|
|
Bossman (m)
|
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
|
Where can we get eclipse
|
|
|
|
|
|
|
|
ade2kay (m)
|
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.comNaija !  I normally would not recommend a beginner use and IDE ( I always suggest textpad). Best post so far ! 
|
|
|
|
|
|
dammytosh
|
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)
|
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 
|
|
|
|
|
|
javaprince (m)
|
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)
|
I wouldn't say IDE's are bad, they make programmin easier and more enjoyable though, makes you a lazy programmer
|
|
|
|
|
|
|
|
azpunpin
|
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
|
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
|
|
|
|
|
|
jacob05 (m)
|
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
|
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)
|
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)
|
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.*  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
|
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)
|
Which JDK version are you using? The Scanner class is part of JDK 1.5 and up. 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
|
Thanx Bossman, I am currently using JDK1.6.0_11
One Love.
|
|
|
|
|
|
Bossman (m)
|
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;
|
|
|
|
|
|