| Basic Java - Part I (Java) | |
|---|---|
| Tweet Topic Started: May 21 2007, 06:59 PM (533 Views) | |
| rig | May 21 2007, 06:59 PM Post #1 |
|
1a5a6a4
![]()
|
Note: Some java compilers require a certain class name for the program to be executed properly. Make sure you learn about your compiler first! All items in red can be changed to any string containing no special chars or numbers. Ignore the blue ones for now, as we will use them later. First off whenever you make anything, make sure that the first line looks something like this
Java uses "classes". Each class may be used for a different purpose. I will teach you in later lessons on how to extend the use of other classes. Use this for the base class, the one which runs the whole thing.
String str; // "Instanziates" the string str, or in standard english it prepares the program to use it. str="Hey!" //This sets the variable str to Hey! System.out.print(str) //This print Hey! System is called an object. Out is a class, and print is called a method. Methods are like functions except each method is particular to its class object. (We'll talk more advanced about this in a later lesson) Another important note, is that you always put a semi colon, after a method or Importing a class.
That is the basic lesson of part I. Ill have more soon. |
| |
![]() |
|
| fsd | May 22 2007, 03:56 PM Post #2 |
|
3a4
![]()
|
Anyone know of a good free java compiler. I tryed using netbeans once but i dont think i could get it to work or somthing. |
|
"mmmmm i love the internet. every time i go to a website i get a cookie HOW AWESOME IS THAT!" - Quote from me "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - Albert Einstein "Imagination is more important than knowledge."- Albert Einstein | |
![]() |
|
| rig | May 22 2007, 04:04 PM Post #3 |
|
1a5a6a4
![]()
|
Try Blue J, its made by the university of kent. Its what I use, and its free. Its actually better than some you can pay for. |
| |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Tutorials · Next Topic » |








3:20 AM Jul 11