I have a very basic program in java,the filename is MainClass1.java
import java.util.Scanner;
class Student{
    String name;
    int roll_number;
    double marks;
    Student(String s,int r,double m)
    {
        this.name=s;
        this.roll_number=r;
        this.marks=m;
    }
}
class MainClass1{
    public static void main(String args[])
    {
        Scanner s=new Scanner(System.in);
        String name="Sourav";
        int roll_number=25;
        double marks=70.50;
        Student student1=new Student(name,roll_number,marks);
        System.out.println("The student is "+student1.name+" and his roll number is "+student1.roll_number+" and his marks is "+student1.marks);
    }
}
It compiles fine,however when I am trying to run it by
java Mainclass1
it shows an error
Error: Could not find or load main class Mainclass1
Caused by: java.lang.NoClassDefFoundError: MainClass1 (wrong name: Mainclass1)
I know its a very basic issue,but unable to figure out the issue.
Please help anyone
 
    