1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
borishaifa [10]
3 years ago
9

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)

{

}

Computers and Technology
1 answer:
NemiM [27]3 years ago
6 0

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
Write about virus in five points.​
kvasek [131]
A computer virus is a malicious software program loaded onto a user's computer without the user's knowledge and performs malicious actions. It can self-replicate, inserting itself onto other programs or files, infecting them in the process.
5 0
2 years ago
Which of the following does Not impact your credit score?
aleksandr82 [10.1K]

Answer:your race, gender, marital status, education level, religion, political party or income, those details can't be factored into your credit scores.

Explanation:

3 0
3 years ago
Write an assembly code to implement the y=(x1+x2)*(x3+x4) expression on 2-address machine, and then display the value of y on th
Ratling [72]

mbly code to implement the y=(x1+x2)*(x3+x4) expression on 2-address machine, and then display the value of y on the screen. Assume that the values of the variables are known. Hence, do not worry about their values in your code.

The assembly instructions that are available in this machine are the following:

Load b, a Load the value of a to b

Add b, a Add the value of a to the value of b and pla

7 0
3 years ago
A _____ miniature battery operated transmitter that can be propelled through a non-metallic pipe or purpose of locating
Anna11 [10]
I think it is the model ET-2. Not quite sure.
7 0
3 years ago
What is the first structure of a pascal program?
lapo4ka [179]

A Pascal program basically consists of the following parts :

Program name, uses command, type declarations, constant declarations, variables declarations, functions declarations, procedures declarations, main program block, statements and Expressions within each block, and comments

6 0
3 years ago
Other questions:
  • Deterime the minimum number of multiplication operations needed to compute the following. Show the order of the computations.
    10·1 answer
  • Develop a Matlab program that allows you to plot the entropy of a source with variable output probabilities. We wish to observe
    8·1 answer
  • Audio editing software contains several codecs that allow you to
    15·1 answer
  • On which of the following pointing devices can you control the pointer by sliding your fingertip?
    11·1 answer
  • An image that has been saved in Tagged Image File Format (or .TIF) is A. readable only by Windows personal computers. B. a recto
    6·1 answer
  • is used to reduce the chance of an individual violating information security and breaching the confidentiality, integrity, or av
    6·1 answer
  • Which element of a presentation program’s interface displays the slide you are currently creating or editing?
    14·2 answers
  • When you expect a reader of your message to be uninterested, unwilling, displeased, or hostile, you should Group of answer choic
    15·1 answer
  • The sameNumber method checks to see if the number of words in the phrase, numwords, is the same number of words contained in the
    5·1 answer
  • To have a reason or purpose to do something
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!