Frist I would Like to Welcome All the members in this Forum
And Also i would like to represent some tutorials about Java , and this frist tutorials maybe look selly to some people but as we move far in this programming language it will get harder and harder ... it seems that i talk so much so lets start .
The Frist Tutorial will be on the Inroduction part of Java and after i will finish the Tutoial will a practical Questions .
ok lets start the Tutorial .
I will start with with the code after that i will explain it :
public class FristProgram {
public static void main (String [] args) {
System.out.println("Welcome to Java programming.");
}
}
As we sea in the code the Line is the code in the Class name .
the second line in the code is the main method .
the third line is the the text that will apear in the sreen , we should use the
System.out.println or System.out.print to print the output .
some people maybe say what is the diffrence bettween the two , the diffrence the first one
it will automatilly print a new line and the second one dont print .
now after this brefing example we will move to more harder one :
public class Add {
public static void main (String [] args) {
int a = 70;
int b = 80;
System.out.println(" a + b = " + (a+b) );
}
}
The output of this program will be :
a + b = 150
Fristly we intialize the a and b ;
a = 70 and b = 80
after that we print the output using System.out.println .
I hope you are getting some benefit from this tutorials .
Thanks for your reading .
and please if you have any question in this tutorial dont hesitate to ask .
that is all and have a nice time .