Write a Java program that creates an array that can hold 50 integer values. Using a for loop, fill the array with even integer values between 2 and 100 inclusive. Then make a separate for loop to print each of the numbers in the array horizontally with a single space between each number. (If you want to be more adventurous, you can fill it with random numbers between 2 and 100) Note: When using a for loop with arrays, use the variable name "index" as the counter in the loop as shown below. This reinforces the fact that integer number that is changing represents the index of an array element. for(int index = 0; index < myArray.length; index++){ // body of your for loop code goes here } // end for

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 16PE
icon
Related questions
Question

Jana

 

Java Programming help, please it's for beginners, so don't make it too hard, please explain if possible

Due Friday by
Write a Java program that creates an array that can hold 50 integer values. Using a for loop, fill the array with even integer values
between 2 and 100 inclusive. Then make a separate for loop to print each of the numbers in the array horizontally with a single space
between each number. (If you want to be more adventurous, you can fill it with random numbers between 2 and 100)
Note: When using a for loop with arrays, use the variable name "index" as the counter in the loop as shown below. This reinforces the
fact that integer number that is changing represents the index of an array element.
for(int index = 0; index < myArray.length; index++){
// body of your for loop code goes here
} // end for
Next >
Transcribed Image Text:Due Friday by Write a Java program that creates an array that can hold 50 integer values. Using a for loop, fill the array with even integer values between 2 and 100 inclusive. Then make a separate for loop to print each of the numbers in the array horizontally with a single space between each number. (If you want to be more adventurous, you can fill it with random numbers between 2 and 100) Note: When using a for loop with arrays, use the variable name "index" as the counter in the loop as shown below. This reinforces the fact that integer number that is changing represents the index of an array element. for(int index = 0; index < myArray.length; index++){ // body of your for loop code goes here } // end for Next >
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Array
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage