Question: What is the error in the given code? public class progArray { public static void main(String[] args) { double] m1 = new double[4.5]; double
What is the error in the given code? public class progArray { public static void main(String[] args) { double] m1 = new double[4.5]; double pgno = new int[]{2,3,4,5); m1= new double {2.1,2.5,3.9,4.2}; System.out.println(m1[1]); System.out.println(pgno[1]); }
Step by Step Solution
There are 3 Steps involved in it
There are several errors in the given code Here is a corrected version java public class ProgArray p... View full answer
Get step-by-step solutions from verified subject matter experts
