Question: What is wrong with each of the following java code segments? 1. ArrayList values = new ArrayList (); 2. ArrayList values = new ArrayList(); 3.
What is wrong with each of the following java code segments?
1. ArrayList
2. ArrayList
3. ArrayList
4. ArrayList
for (int I =1; I <=10; i++)
values.set( i-1, i*i );
5. ArrayList
for (int I =1; I <=10; i++)
{
values.add( i*i );
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
