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)

{

}