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 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
Get step-by-step solutions from verified subject matter experts
