How do you exit sub in Java
In vb you can say
Code:
if filename = "" then exit sub
and that will stop the function from executing more code, how can I do the same in java?
Here is what I got so far but its not compiling
Code:
private void jToggleButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String filename=jTextArea1.getText();
if filename = "" then return;
}
What do i have to put instead of 'return'?
Re: How do you exit sub in Java
The return keyword will do exactly the same as Exit Sub in VB
Re: How do you exit sub in Java
And by the way:
vb Code:
if filename = "" then return;
Oh my god
It's:
Code:
if( filename.equals("") ) return;
Re: How do you exit sub in Java
lol, I accidentally put 'then' , java doesn't use then. Its gonna be hard getting used to Java again. Thanx brotha
Re: How do you exit sub in Java
Never mind. Correct it right now. It is good to see pal.