Write a program that adds the numbers 1 through 5 into the numbers ArrayList and then prints
Fantastic news! We've Found the answer you've been seeking!
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 java.util.ArrayList;
public class MyProgram extends ConsoleProgram
{
public void run()
{
ArrayList
// Add 5 numbers to `numbers`
// Print out the first element in `numbers`
}
}
Related Book For
Posted Date: