C
C Student
Hi All,
I am going through the java tutorials on the sun web site. I noticed
that their examples for the main method has a void return type. In
other languages you tend to use an int return type and send either a 1
or a 0 to the operating sytem when exiting.
I was wondering if you are meant to do this in java and if not why
doesn't java return a value to operating system as is typical in other
languages.
Below is a code example.
public class hello {
public static void main(String[] args) {
System.out.println("hello");
}
}
Cheers
I am going through the java tutorials on the sun web site. I noticed
that their examples for the main method has a void return type. In
other languages you tend to use an int return type and send either a 1
or a 0 to the operating sytem when exiting.
I was wondering if you are meant to do this in java and if not why
doesn't java return a value to operating system as is typical in other
languages.
Below is a code example.
public class hello {
public static void main(String[] args) {
System.out.println("hello");
}
}
Cheers