↧
Answer by AnOldSoul for java Syntax error on token "(", ; expected
You cannot create another function like that inside main function. Move the function out of the main function scope and call wherever necessary
View ArticleAnswer by Matthew Champion for java Syntax error on token "(", ; expected
As stated by ratchet freak, you need to move the function out of main. The function itself belongs to the Assignment1 class and as such needs to be:import javax.swing.JOptionPane;public class...
View Articlejava Syntax error on token "(", ; expected
/*help me to correct this error*/import javax.swing.JOptionPane;public class Assignment1{ public static void main(String args[]) { String input = JOptionPane.showInputDialog("Enter a string"); if...
View Article