A Simple Case Study: Import Java - Io.
A Simple Case Study: Import Java - Io.
*;
String name;
int age;
String designation;
double salary;
As mentioned previously in this tutorial, processing starts from the main method.
Therefore, in order for us to run this Employee class there should be a main
method and objects should be created. We will be creating a separate class for
these tasks.
Following is the EmployeeTest class, which creates two instances of the class
Employee and invokes the methods for each object to assign values for each
variable.
Save the following code in EmployeeTest.java file.