I have an array of objects (customer) that has components: first_Name & last_Name. I am trying to convert both the first name and last name of each customer to title case. I have tried making several different methods that will convert strings to title case, but all of them have failed. This is the last thing I have tried and I cannot figure out why it would not capitalize the first letter of the first name and the first letter of the last name.
for (Customer c : customers){
c.setFirst_name(c.getFirst_name().charAt(0).toUpperCase());
}
I have checked that the first name and last name indeed contain an only-letter string with a lower case letter as the first letter in each. The error intellisense is giving me is that "char cannot be dereferenced"