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
Vanyuwa [196]
3 years ago
15

Write a method named lastIndexOf that accepts an array of integers and an * integer value as its parameters and returns the last

index at which the * value occurs in the array. The method should return -1 if the value is not * found.
Computers and Technology
1 answer:
evablogger [386]3 years ago
7 0

Answer:

The method is as follows:

public static int lastIndexOf(int [] numbers, int num){

    int lastIndex = numbers[0];

    for(int i =0; i<numbers.length;i+=num){

        lastIndex = numbers[i];

    }

    return lastIndex;

}

Explanation:

This defines the method

public static int lastIndexOf(int [] numbers, int num){

This initializes the lastIndex to the first element of the array

    int lastIndex = numbers[0];

This iterates through every "num" element of the array

    for(int i =0; i<numbers.length;i+=num){

This gets the current index... until the last

        lastIndex = numbers[i];     }

This returns the last

    return lastIndex; }

You might be interested in
Copyright laws were established :A. to allow authors to distribute their work while maintaining certain ownership rights. B. to
astra-53 [7]

Answer:A

Explanation:

Copy right is an intellectual property right granted by the government that gives the owner exclusive rights to use, with some limited exception, original expressive work.

3 0
4 years ago
A professional-looking portfolio gives a clear message. What does it convey?
Akimi4 [234]

Answer:a

Explanation:

8 0
3 years ago
Lee purchased a new pc from dell computer's web site. he purchased his product via a(n) ________.
olga55 [171]
A <span>direct distribution channel if I'm not wrong.</span>
4 0
4 years ago
____________ describes all the communication channels that allow community-based input, interaction, content-sharing and collabo
vladimir1956 [14]

Answer:

Social media.

Explanation:

The social media is an online platform that provides its users with the web application interface for easy communication. Since it is online, the user must subscribe to a ISP service, create an account on the social media website, and optionally download it's application on the device for easy access.

User accounts are secured with a username and password. The user on the site can share graphic, video, audio and text content, interact with friends etc.

7 0
4 years ago
Which of the following should NOT be done to keep people from slipping on floors? A) Have the proper absorbents in an easy-to-fi
RoseWind [281]

The following options helps keep people from slipping on floors

A) Have the proper absorbents in an easy-to-find place to quickly put on spills : So that accidental little spills can be cleaned right away.

C) Wear slip-resistant footwear : It is a precautionary step to follow, no matter where we go.

D) Mark a slippery area with an easy-to-use tent sign that says " Caution, Slippery floor" : This allows people to be aware of the wet area and cross it cautiously.

Leaving oil and fluids to air dry thoroughly, takes a long time and there are chances that people step over it and slip.

So, the answer is

(B) Anytime oil or fluids are spilled on the floor, leave them to thoroughly air dry.

8 0
4 years ago
Read 2 more answers
Other questions:
  • Caroline has been asked to find a standard to guide her company’s choices in implementing information security management system
    13·1 answer
  • What is logical memory?
    15·1 answer
  • During an upgrade for a new web server, Glen's company experienced a power surge. The power surge hit the new server, and now th
    10·1 answer
  • Rebecca is an interior designer. What is her job role? need this asap
    9·1 answer
  • I need help in raft survival ocean nomad I was traveling and now I can't enter the island or go back home (raft). Please help me
    15·1 answer
  • Brian needs to see the space available to insert content on a slide in his presentation which feature of the presentation should
    10·1 answer
  • An individual involved with the aspect of a project will be concerned with budgets and the costs associated with running a busin
    10·2 answers
  • Hey IM new uh what is this?
    5·1 answer
  • Ismael is examining a report in Access. He needs to access a view that will be used to examine and change the structure of the r
    9·2 answers
  • Identify the parts of it, Give at least three web browser that you usually used to visit a website.​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!