Question: 1. Find the syntax error(s) based on the following code segment and highlight the error by putting comments, then amend the error. public class


1. Find the syntax error(s) based on the following code segment and 

1. Find the syntax error(s) based on the following code segment and highlight the error by putting comments, then amend the error. public class Array { public static void main(String[] args) { int sum[2,4]; for(int i=2; i>0; --1) { for(int j=4; j>0; --){ } System.out.print(sum + " "); System.out.print(" "); 2. Write a Java program to create a new array list, add all rainbow colors (string) in the correct order and print out the collection.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!