PDA

View Full Version : Any JAVA gurus here?



Delerium
8th April 2009, 20:36
Im working on an assignment and cant quite figrure out how to complete one of the steps. any help would be much appreciated.

Essentially I need to know if there is a command that will stop the program at a certain point if required. That is, once certain conditions are met it will not continue through to the next instruction. I can provide details if required.

rphenix
8th April 2009, 20:59
Im working on an assignment and cant quite figrure out how to complete one of the steps. any help would be much appreciated.

Essentially I need to know if there is a command that will stop the program at a certain point if required. That is, once certain conditions are met it will not continue through to the next instruction. I can provide details if required.

You may have more luck on something like geekzone :) but anyway...
System.exit(0) (where 0 is the exit code obviously).

javawocky
9th April 2009, 10:10
Wow - way off topic ;)

But, If you just want to stop execution you might want something like this...

if(someConditionMe)
{
System.exit(0);
}

Hope that helps.