0

I want to ask >>what is the use of (string args[])???
and how can I use system.exit >>without intially import the package (java.lang) ?
thanks ^^

import javax.swing.JoptionPane;
public welcome1 {
public static void main (stirng args[]){
JoptionPane.showMessageDialoge(null,"welcome to java");
system.exit(0);
}
}
2
Contributors
1
Reply
8
Views
2 Years
Discussion Span
Last Post by JamesCherrill
0

When someone runs your program from the command prompt (or batch file etc) they can add parameters to their command. You get a copy of those parameters in the String array.

java.lang.* is imported by default in all Java programs

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.