The strFirstName and strLastName variables contain the strin

The strFirstName and strLastName variables contain the strings “Jane” and “Jones”, respectively. Which of the following statements will display a string as “Jones, Jane” (the last name, a comma, a space, and the first name) in the lblFullName control?

Solution

public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); // Actually use the Reader String name = br.readLine(); // Don\'t mistake String object with a Character object String s1 = name.substring(0, 1).toUpperCase(); String nameCapitalized = s1 + name.substring(1); System.out.println(nameCapitalized); }
The strFirstName and strLastName variables contain the strings “Jane” and “Jones”, respectively. Which of the following statements will display a string as “Jon

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site