what does "System.exit()" mean?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
what does "System.exit()" mean?
a good programmer can write a Java program in any language
System.exit(); //Terminates the currently running Java Virtual Machine.
Source: System (Java 2 Platform SE v1.4.2)
I don't know what that means... as I wrote, I'm a beginner...
a good programmer can write a Java program in any language
It stops your currently running program.
yeah, so lets say you got an application with a button.
And if you press the button "System.exit();" will be called, that means that your application will end(terminate) if you press the button
Yep, if there is a particular point of the program where you would want to programmatically terminate the program, you would code:
System.exit(0);