This code prints all elements of the array geo
for ( int i = 0; i < geo.length; i++ )
{
//the code is missing here
}
__________________________________________________________________
Where is the error in this code sequence?
// a is an ArrayList of strings
// a has already been declared and instantiated
a.size ( ) = 10;
________________________________________________________________
You coded the following in the Test.java class:
public static void main (string) [ ] args)
{
// cars is an ArrayList of Auto Objects
// cars has already been declared and instantiated
for ( Auto a ; cars ) // line 12
{
System.out.println (a. to string ( ) );
} // line 15
} //line 16
When you compile, you get the following message:
Test.java:12 '; 'expected
for ( Auto a ; cars ) // line 12
^
1 error
Explain what the problems are and how to fix them.