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
Papessa [141]
4 years ago
5

JAVA

Computers and Technology
2 answers:
photoshop1234 [79]4 years ago
8 0

Answer:

public static void main()

{

Scanner console = new Scanner(System.in);

System.out.println("Enter in a value");

int a = console.nextInt();

int[] array = {1,2,3,4,5};

int a1 = search(array, a);

System.out.println(a1);

}

public static int search(int[] array, int value)

{

boolean okay = true;

int b = 0;

for(b = 0; b<=array.length-1; b++)

{

if(value==array[0])

{

okay=true;

}

else

{

okay = false;

}

}

if(okay = true)

{

return b;

}

else

{

return -1;

}

}

Explanation:

Ann [662]4 years ago
7 0

Answer:

Answer is in the attached screenshot!

Explanation:

Just iterate through the values in the list - if the value at the index is equal to the one you are searching for, just return that index. If no value is returned then return with -1!

You might be interested in
The first row of a table is often called the _____ row.
satela [25.4K]

ANSWER:

The first row of a table is often called the header row.

~batmans wife

7 0
3 years ago
Read 2 more answers
*PLEASE ANSWER QUICK*
dezoksy [38]

Answer:

pretty sure its insert.

Explanation:

8 0
3 years ago
Read 2 more answers
Configuring a firewall to ignore all incoming packets that request access to a specific port is known as ____.
Sati [7]

Answer: Logical Point Blocking

Explanation:

4 0
1 year ago
Assume you are on the only person to write program on this system. Assume the system's OS uses the "priority-scheduling" schedul
kondor19780726 [428]

Answer:

1. Write all programs to have the same priority.

Explanation:

Write all programs to have same priority. So that there will be no context switching in between.

7 0
3 years ago
Annie needs to provide a form field that will allow users to select from a predefined list of options but without the ability to
makvit [3.9K]

Answer:

drop-down list

Explanation:

understand the definition of each of the options, and you will easily work out the answer.

See this page for differences between drop-down list and combo box: https://docs.microsoft.com/en-us/windows/win32/uxguide/ctrl-drop

Of the 4 answers, only drop-down list doesn't allow user to add own option

5 0
4 years ago
Other questions:
  • Write a unit test for addInventory(). Call redSweater.addInventory() with parameter sweaterShipment. Print the shown error if th
    9·2 answers
  • How does limiting a company's scope benefit the company? A. It encourages the company to use division of labor. B. It makes it e
    10·2 answers
  • Seven basic internal components found in a computer tower
    8·1 answer
  • What are career resources?
    7·2 answers
  • What are operational databases
    12·1 answer
  • What are the best ways to find data within a spreadsheet or database? Check all that apply. sorting tools the help function scro
    11·2 answers
  • Which of the following is considered a basic task in the context of computer operations? a. Connecting to the Internet b. Natura
    6·1 answer
  • Dora has inserted a text box into a Word document that she is formatting. Which strategy will not format text boxes? Create a li
    6·2 answers
  • Write ONE SQL statement for each of the following tasks. Note that you can only use conditions specified in the task description
    5·1 answer
  • What internal commands can we use when in interactive mode? can we use CLS and CD?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!