What I have is a student with a name and firstletter
So I have a class student like:
private String name = "Unknown";
private char nameLetter = "u";
public void identify()
{
System.out.println("Student first letter : " + nameLetter);
System.out.println("Student name : " + name);
}
public void setName(String newName)
{
name = newName;
nameLetter = newName.substring(0);
}
But i get the error cant convert from string to char.
I know I could make a String nameLetter instead of char but I want to try it with char.