hello to all,
public class Person
{
protected String name;
protected String gender;
protected int dateOfBirth;
protected String address;
protected String natInsceNo;
protected String phoneNo;
protected static int counter;//class variable
public Person(String nme,String addr, char sex, int howOld, String ins,String phone)
{
dateOfBirth = howOld;
gender = sex;
name = nme;
address = addr;
natInsceNo = ins;
phoneNo = phone;
counter++;
}
public String getGebder()
{
if (gender == 'm' || gender == 'M')
return "Male";
else if (gender == 'f' || gender == 'F')
return "Female";
else
return "Wrong Input";
}
on this code, the user insert a char and the programs returns a String
could you please tell how to make the conversion?
thank you in advanced!