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
I can't find my grandson someone help
Artemon [7]

Answer:

i'm right here

Explanation:

grandma

8 0
2 years ago
Read 2 more answers
Explain in details three security countermeasures you know.​
SpyIntel [72]

Answer:

The three options are:

1. Avoid sharing files and folders over the network without the permission of your administrators. You might fall in trouble otherwise.

2. Never share your credit card details with a third party through the internet. You can lose a lot of or all your money.

3. Always ensure that your password is strong enough or else your account can be hacked, And never share them with anybody.

Explanation:

Please check the answer.

4 0
3 years ago
Currently, this program will add 6 and 3 together, output the math problem and output the answer. Edit this code so that a rando
Yakvenalex [24]

I've included my code in the picture below. Best of luck.

6 0
3 years ago
Helppppp
ASHA 777 [7]

Answer:

=IF(E4<=F4, “Reorder”,”No”)

Explanation:

7 0
3 years ago
Write a program that asks the user for several days' temperatures and computes the average temperature for that period and how m
elena-14-01-66 [18.8K]

Answer:

#section 1

<em>no_of_days= int(input('How many days are we geting the average for: ')) </em>

<em>tem=[] </em>

<em>for i in range(no_of_days): </em>

<em>    a= int(input('Enter temperaure: input ' + str(i+1)+'  :')) </em>

<em>    tem.append(a) </em>

<em />

#section 2<em>     </em>

<em>average = round(sum(tem)/len(tem),2) </em>

<em>print('The Average is ',average) </em>

<em>gdays=[] </em>

<em>for i in tem: </em>

<em>    if i > average: </em>

<em>        gdays.append(i) </em>

<em> </em>

<em>print('The following days are greater than the average: ',gdays)</em>

Explanation:

The above code is written in python 3

#section 1:

An input is gotten for number of days that is to be used in the calculation, and an array is created to hold the temperature that will be inputted into the program.

A range of values from [0 - (no_of_days - 1)] is created from the number of days entered, this is done so that the FOR loop can iterate through every number and call for inputs.

The FOR loop prompts the user for an input based on the range and passes that input to an integer data type before appending it to the tem array.

#section 2:

The sum of the new list and the length is used to calculate the average and the it is rounded up to 2 DP, The average is then printed to the screen.

Another FOR loop is used to check which of the days are greater than the average and passes it to another array (<em>gdays)</em>, this array is also printed to the screen.

check the attachment to see how the code works.

4 0
3 years ago
Other questions:
  • In Python Calculate the BMI of a person using the formula BMI = ( Weight in Pounds / ( ( Height in inches ) x ( Height in inches
    9·1 answer
  • How can website illustrate cooperations and kidness?
    8·1 answer
  • A business letter should always include the address of the sender.<br> True<br> False
    12·2 answers
  • Interest rate risks would be most relevant to what purchase?
    7·2 answers
  • What will be the value of ans after the following code has been executed?
    10·2 answers
  • Write a program that allows the user to enter a time in seconds and then outputs how far an object would drop if it is in free f
    7·1 answer
  • 2. A well designed high-volume system will minimize _________ inventory and reduce _____________for the product or service. a) w
    7·1 answer
  • IF YOU PLAY SURVIV&gt;IO WITH ME RIGHT NOW I WILL GIVE YOU BRAINLIEST<br> AND IM NOT KAPPING
    5·1 answer
  • Consumer consequences for illegally downloading software
    6·1 answer
  • Which of the following statements is TRUE? A. A name error occurs if the variable is referenced before it is declared. B. A name
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!