Same Code Not working

I have implemented the same code in my IDE but there is a error saying name cannot be resolved or it is not in field.
person class
package Lecture10;

public class person {

public static void main(String[] args) {
	// TODO Auto-generated method stub
	 String name;
	 int age;

}

}
peraon_client

package Lecture10;

public class person_client {

public static void main(String[] args) {
	// TODO Auto-generated method stub
	person p1= new person();
	person p2=new person();
	p2.name="T";
	p2.age=20;
	System.out.println(p2.name);
	System.out.println(p2.age);

}

}

@tushargupta_587,
In the person class:
you have to do:

public class person {

	// TODO Auto-generated method stub
	String name;
	int age;

}

Don’t declare name and age inside the main function. In fact you don’t have to create a main function here.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.