I'm so lost
I am a student in a Java programming class. I'm reading my textbook and several online postings, but I am missing something and I feel like it must be something very obvious.
I need first of all to write a class that goes with a program, but I need to be able to compile each class, before it will work with the main program, right?
This is just to get a name. Can anyone help? Thanks!
This is my code and the errors are commented:
//This is an employee class from which you get the employee name.
public class EmployeeName.java
{
//main method begins program execution
public static void main( String args[] )
{
public void setEmployeeName (String EmployeeName)
//ERROR: EmployeeName.java:3: '}' expected
//public class Employee.Name.java (with a ^ under the . between
// Name and Java)
{
EmployeeName = new EmployeeName();
} //end setEmployeeName
//returns the name string
public String getEmployeeName();
//ERROR: EmployeeName.java:9: illegal start of expression
// public void setEmployeeName (String EmployeeName)
//with the ^ under the P in public
{
return EmployeeName;
}//end getEmployeeName
} //end main
} //endclass EmployeeName
//ERROR: EmployeeName.java:22: class, interface, or enum expected
} //endclass EmployeeName -> [arrow] (with the ^ under the })

