I'm pretty sure I'm doing everything right. But my getAge class isn't working. The code has a problem with where I do 'return age' although I can't fathom why that would be the case. Please Help.
package com.codegym.task.task05.task0508;
/*
Getters and setters for the Person class
*/
public class Person {
private String name;
private int age;
private char sex;
public void Person(String name, int age, char sex){
this.name = name;
this.age = age;
this.sex = sex;
}
public void setName(String name){
this.name = name;
}
public String GetName(){
return name;
}
public void setAge(int age){
this.age = age;
}
public int getAge(){
return age;
}
public void setSex(char sex){
this.sex = sex;
}
public char GetSex(){
return age;
}
public static void main(String[] args) {
}
}