Hello All
there are some questions that I know it will happen but don't
know the reason WHY?
1> Why can't main function return any value .
for eg:
<CODE>
class try1
{
public static int main(
String agrs[])
{
System.out.println("Hello" );
return 0 ;
}
}
</CODE>
though it compiles ok but gives run time Error.
2> System.out.println("Hello" );
where System is a class
out is an object of static PrintStream ?
println is a method
is it possible for a static PrintStream to have an OBJECT?
or I am missing something?
Thank You
Anshul Mathur