Question: in JAVA, Create a method called firstLast that will produce the first and last characters of a String. Your method should take as a parameter
in JAVA,
Create a method called firstLast that will produce the first and last characters of a String. Your method should take as a parameter the String to get the first and last characters from. Your method should return a String that contains the first and last characters separated by a space.
Example:
Given the String "Hello World"
Your method should return a String formatted as follows:
"H d"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
