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
For question 1-3, consider the following program: def tryIt(a ,b = 7) return a + b
tino4ka555 [31]

Answer:

1)18

2)4

3)28

Explanation:

1) ans= tryIt(2) *2

        = (2+7)* 2 =18

2) ans= tryIt(-5) *2

        = (-5+7)* 2 =4

3) ans= tryIt(7) *2

        = (7+7)* 2 =28

3 0
3 years ago
____________ occurs when a provider does not support data export or when a provider's service is unavailable through others.
elixir [45]

Answer:

The correct answer to the following question will be Vendor Lock-In.

Explanation:

Vendor Lock-In: It is also known as Customer Lock-In. The Vendor Lock-In makes the costumer depends on services and products on the vendor. The costumers are not able to use another vendor without changing costs as it creates barriers.

Some ways to avoid Vendor Lock-In, these are as follows:

  • Design your application portable.
  • Keep watching vendor contracts.
  • Arrange both entry and exit with your vendor.

8 0
3 years ago
A programmer is writing a program that is intended to be able to process large amounts of data. Which of the following considera
Dmitry [639]

Answer:

B. How many programming statements the program contains

Explanation:

If a program is intended to be able to process large amounts of data, then the ability of the program to process larger data sets is heavily affected by

  • execution time
  • size of memory the program requires
  • storage space the program requires as it runs.

The length of the statements the program contains does not much affect program performance.

8 0
3 years ago
Is anyone excited for the new matrix coming out ?
Vinil7 [7]

Answer:

Yes, me!!

Explanation:

5 0
3 years ago
Read 2 more answers
ASAP
grin007 [14]
I would recommend A. Quickly on the left and move ahead of it because you should always pass on the left and seeing as it is a large truck, you would want to get ahead of it ASAP.
4 0
4 years ago
Read 2 more answers
Other questions:
  • What is the best class setup for the mp5 in Modern Warfare?
    7·1 answer
  • How to remove a channel from favorite list on suddenlink?
    15·1 answer
  • Select the correct answer.
    15·1 answer
  • What are the three business writing formats
    12·1 answer
  • Write a function called convert_format which converts the format of a date from mm/dd/yyyy to month name dd, yyyy.
    12·1 answer
  • Which of the following statements is correct?
    11·1 answer
  • What’s an example of software?
    6·2 answers
  • Tornado Alley is located in the middle of the United States, extending from Texas up through the Dakotas. The above statement is
    6·1 answer
  • How can you remove background noise from a video?
    15·2 answers
  • Look at (c), is it accurate? ​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!