Here is a little tutorial in Java for people who are insterested in programming. I love programming and would love to help teach anyone who is insterested in learning. So here is a program for beginners to learn. "Remember all programmers learn by mimicking what other programmers have done before them."
// A easy first program
public class Welcome {
public static void main( String args[] )
{
System.out.println( "Welcome to AntiOnline!" );
}
}
Now i will break it down:
Line 1: // is just a comment, programmers insert comments for program readability;
Comments are ignored by the java complier.
Line 2: public class Welcome {
/*This begins a class definition for "Welcome". Every program in
java consists of at least one class definition that is defined by
the programmer. Notice Welcome is what the programmer names it.
I could of even put " public class AntiOnline { ". The keywords
" public class " remain a consant for now. the {
begins the body of the class*/
Line 3: public static void main ( String args[] )
/*is part of every java application
Application begin excuting at main.
The parentheses after main indicate that main is
is a building block called a method. Methods are
able to perform tasks and return information when
they complete there task. The void keyword
indicates that the method will perform a task but,
will not return any information when it completes
its task.*/
Line 4: { // begins the body of the method definition
Line 5: System.out.println( "Welcome to AntiOnline!" );
/*This is self explanatory but, i
will go indept. This instructs
the computer to perform an action. The computer will
print out the string of character between the
quotation marks. System.out is known as the standard
output. The entire line, including System.out.println,
its arugment in the parnetheses and the semicolon, is
called a statement. A semicolon is a statement terminator.*/
Line 6: } // ends method main()
Line 7: ) // ends class Welcome
The output of this program is:
Welcome to AntiOnline!
I suggest you learn C++ first
because java is built on top
of C++. But you can learn java first if that is what you want,
its just easier if you know C++.
If people like this tutorial i will be glad to go a step farther.
Enjoy all!!
