I have a really silly question but I don't know what do since I'm a beginner. From the title, you can probably guess what I need help with...
Here is the basic program I have created:
// Character name.
import java.util.Scanner;
public class name {
public void charName(){
Scanner input = new Scanner(System.in);
String name;
System.out.println("What is your name?");
name = input.nextLine();
System.out.println(name + "? That's a very nice name, pleased to meet you!");
}
}
This asks for a name, and then repeats the name again along with a statement. My problem is that this replies with the exact thing I have inputted, so if I enter "jake" it will reply with "jake" or if I enter "JaKe" it will reply with "JaKe". I want this program to be able to say persons name with the first letter capitalised no matter how I type it. E.g. I type "JAKE" but it responds with "Jake".