Write the method that finds the first 4 numbers out of 100 randomly generated numbers. After the numbers are generated in main, they should be sent to the method given as an example below and the smallest four numbers should be found. Write the numbers found on the console screen in the main method.(will be coded in java) Method name: public static int[] smallestFindFirstFourth(int[] array) Note: Sorting algorithms or ready-made functions will never be used.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question

Write the method that finds the first 4 numbers out of 100 randomly generated numbers. After the numbers are generated in main, they should be sent to the method given as an example below and the smallest four numbers should be found. Write the numbers found on the console screen in the main method.(will be coded in java)

Method name: public static int[] smallestFindFirstFourth(int[] array)

Note: Sorting algorithms or ready-made functions will never be used.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
void method
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT