/*******************************************************************************
 * Employee class, with local variables having the same name as fields
 ******************************************************************************/
public class Employee
{
    static String companyName  = "XYZ Corporation";    	 	//static field
    
    String position;                             			//instance fields
    String lastname; 
    String firstname;

    Employee(String title, String last, String first)		//constructor 
    {
        position  = title;
        lastname  = last;
        firstname = first;  
    }

    String employeeInfo()                                   
    {
        String info = companyName +" "+ position +" "+ firstname +" "+ lastname + "\n";
        return (info);
    }
    String employeeInfo2()                                  
    {
        String companyName = "ABC Consulting ";    		//create local variables with same name as fields
        String position    = "President";                   

        String info = companyName +" "+ position +" "+ firstname +" "+ lastname 
                    + "\n"
                    + Employee.companyName +" "+ this.position +" "+ firstname +" "+ lastname;
        return (info);
    }
}