Question: 1). Where is the error in this code sequence? double [] a = new double[4]; for ( int i = 0; i
1). Where is the error in this code sequence?
double [] a = new double[4];
for ( int i = 0; i <= a.length; i++ )
{
System.out.println( a[i] );
} _____________________________
2). Where is the error in this code that attempts to output all the values in an array?
int [] a = { 3, 26, 48, 5 };
System.out.println( a );
_____________________________
3). Where is the error in this code sequence?
int [] a = new int[3];
a[0] = 12;
a[1] = 24;
a[2] = 23.5; _______________________________
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
