Syntax Error
Method call expected, but ';' found at line 15 column 14 in the method 'main'
What This Error Means
This error occurs when the Java compiler encounters an unexpected symbol or keyword in the code.
Why It Happens
The error typically happens when there is a mismatch between the expected symbols or keywords and what is actually present in the code. In this case, the semicolon ';' has been placed before the closing parenthesis ')'.
How to Fix It
- 1To fix this error, remove the semicolon ';' before the closing parenthesis ')'. The corrected code should have the semicolon ';' after the closing parenthesis ').
Example Code Solution
public class Main {
public static void main(String[] args;
System.out.println("Hello World");
}public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}Fix for Method call expected, but ';' found at line 15 column 14 in the method 'main'
Browse Related Clusters
Related JAVA Errors
java.lang.StackOverflowError at com.example.Main.main(Main.java:15) -
Error executing SQL query: Cannot insert explicit value for identity c
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
Cannot find symbol: variable 'name' in void main(String[] args)
Related JAVA Blog Articles
Have a different error? Get an instant explanation.
Explain Another Error