Question: Write a program that adds the numbers 1 through 5 into the numbers ArrayList and then prints out the first element in the list. import
Write a program that adds the numbers 1 through 5 into the numbers ArrayList and then prints out the first element in the list.
import java.util.ArrayList;
public class MyProgram extends ConsoleProgram
{
public void run()
{
ArrayList
// Add 5 numbers to `numbers`
// Print out the first element in `numbers`
}
}
Step by Step Solution
3.53 Rating (150 Votes )
There are 3 Steps involved in it
import javautilArrayList public class MyProgram extends Console... View full answer
Get step-by-step solutions from verified subject matter experts
