public static void main (String[] args).....why??
843789May 29 2010 — edited May 30 2010hello folks,
this is my first post.
I´ve been learning java on my own for a few days now.
questions:
1.
is it always necessary to have the following words preced the main method?
public static void
what does each one mean?
is it necessary to write them always in the same order?
2. the arguments of the main method go in between parenthesis, right?
Are they always String[] args??
so far in the examples I have tried, the main method uses numeric values for variable x, but the arguments are still String[] args
example:
public class Practice
{
public static void main(String[] args)
{
// degree= angle
// angle= in radians
double angle, degree, a;
degree= 180 ;
angle= (degree*2*Math.PI)/360;
a= Math.sin(angle);
System.out.println(a);
}
}