I keep getting the same error and have no idea how to fix it. The error is
Question:
I keep getting the same error and have no idea how to fix it. The error is No main methods...
Here is the program
public class Name {
private String fname; private char mname; private String lname;
public Name(String fname,char mname,String lname) { this(fname,lname); this.mname=mname; }
public Name(String fname,String lname) { this.fname=fname; this.lname=lname; }
public String getNormalOrder() {
if(mname=='u0000')
return fname+" "+lname;
else
return fname+" "+mname+". "+lname;
}
public String getReverseOrder() {
if(mname=='u0000')
return lname+", "+fname;
else
return lname+", "+fname+" "+mname+".";
}
public String getInitials() {
if(mname=='u0000')
return fname.toUpperCase().charAt(0)+""+lname.toUpperCase().charAt(0);
else
return fname.toUpperCase().charAt(0)+""+Character.toUpperCase(mname)+""+lname.toUpperCase().charAt(0);
}
}
Introduction To Materials Management
ISBN: 978-9386873248
8th edition
Authors: Arnold J. R. Tony, Gatewood Ann K., M. Clive Lloyd N. Chapman Stephen