Question: Create a List of Integer: Given a variable of type int called endNum, create a List of Integer. Call the List numberList. Use a for
Create a List of Integer:
Given a variable of type int called endNum, create a List of Integer.
Call the List numberList.
Use a for loop to populate the List with elements.
The elements will be the double of the numbers from one to whatever value is stored in the variable input endNum.
Finally, print the List to the console.
Hint: To double a number, multiply that number by In Java
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
