Question: 1. Create a NetBeans project under the name PlayingWithJavaStrings. 2. In the source code do the following: i) Create two separated String variables, one for
1. Create a NetBeans project under the name PlayingWithJavaStrings.
2. In the source code do the following:
i) Create two separated String variables, one for the first and the other for the last names and set them to John and Smith, respectively.
ii) Create a String variable for the full name and then concatenate the first and last name variables into it.
3. Using the String methods found in the Java API:
- Print the full name in the terminal window
- print in the terminal window the contents of the full name variable in all CAPITAL LETTERS
- same as above but all in lower case letters
- Print the number of letters that the full name has
- Print the 6th letter of the full name
- Create two more String objects with the contents of Mary (first name) and Smith (last name). Compare if John and Mary have the same last name and if so print that they are related, otherwise that they are not
solve using java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
