What's wrong with my java program, "illegal start of expression error"

Idate

I'm a very beginner in JAVA, I can't run my project.

cmd said <identifier>expected;illegal start of expression;not a statement; ';'expected totally 5 errors

public class 1 {
  public static void main(String[] args){
    int A=2;
    int B=2;
    System.out.println(A);
  }
}
Elliott Frisch

You can't name your class a numeral 1.

public class 1{ // <-- no

should be something like

public class One { // <-- the word one is fine

or (if possible) something meaningful like

public class Example { // <-- for example.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

"Illegal start of expression" error in Java

java illegal start of expression error

Illegal start of expression error in Java

I keep getting an "illegal start of expression" error on my code

Netbeans is giving me "illegal start of expression" error message on my methods

What's wrong with my simple Java program?

What's wrong with my program - short program

What's wrong with this Java program?

What's wrong with my python program?

What's wrong with my Python 2 program?

Receiving Illegal start of expression error

What's wrong with my SQL update? Java

What's wrong with my maze checker??? (JAVA)

Weird "illegal start of expression" error in Netbeans

I have no idea what's wrong with my TensorFlow program

What's wrong with this function? It crashes my program with no error

What is wrong with my shuffling program?

What is wrong with my java code for Project Euler's program 4? (finding the largest palindrome of 2 3 digit numbers)

What's wrong with this Java program regarding TimeUnit Day conversion?

What's Wrong In This Python Program

What's wrong with this tkinter program?

What's wrong with my object tag to embed a Java Applet?

What's wrong with my java code to rotate a jpeg photo?

What's wrong with my java code? Project Euler 12

what is wrong in my program to add ImageView programmatically

What is wrong with my CS I class program?

i dont understand what is wrong in my program

Running into an illegal start of expression error while changing the value of an array

What's wrong with my C program? It's about pointer and selection sort