Write a method called justFirstAndLast that takes a single String name and returns a new String that is only the first and last
name.
You may get a name with a middle name or multiple middle names but you should ignore those.
You can assume that there will be at least two names in the given String.
Java
public String justFirstAndLast(String name)
{
}
1 answer:
Answer:
Answer is in the attached screenshot.
Explanation:
Using regex to split a given input string via whitespace, then returns the first and last element of the array.
You might be interested in
Answer:kk ima do it
Explanation:
Programmers/Coders write the instructions for a Computer.
Page break preview identifies manual page breaks with a dotted blue line and automatic page breaks with a solid blue line.
a. True
Answer:
I think he may be a nut, but I'm not sure, there's little evidence of what he says to be true.