package stu;
class student
{
int age;
String name;
public student()
{
name = "Animesh";
age = 19;
}
public void display()
{
System.out.println("Student name is : " + name);
System.out.println("Age is :"+age);
}
}
import stu.student;
class student1
{
int marks;
String sub;
public student1()
{
sub = "Mathematics";
marks =99;
}
public void display()
{
System.out.println("Student marks is : " + marks);
System.out.println("subject is :"+sub);
}
public static void main(String[] args)
{
student s1 = new student();
s1.display();
student1 s2 = new student1();
s2.display();
}
}
I have got these these two class files in a Folder named 'stu'.
This folder has the path "F:\java\"
The Environment Variable is already set.
The errors which I get are related to '....class not found....'.
I cannot understand how to run this program.
Could anyone tell me the correct way to do it....so that both the files run !!!!