public class Program { public static void main(String[] args) { int[ ] intArr = new int[5]; int[5]={1,2,3};
this is the code .. but when i run it ...output comes with these error: ..\Playground\:5: error: ']' expected int[5]={'1','2','3'}; ^ ..\Playground\:5: error: not a statement int[5]={'1','2','3'}; ^ ..\Playground\:5: error: illegal start of expression int[5]={'1','2','3'}; ^ ..\Playground\:5: error: illegal start of expression int[5]={'1','2','3'}; ^ ..\Playground\:5: error: not a statement int[5]={'1','2','3'}; ^ ..\Playground\:5: error: ';' expected int[5]={'1','2','3'}; ^ ..\Playground\:6: error: <identifier> expected System.out.println(intArr.length); ^ ..\Playground\:6: error: <identifier> expected System.out.println(intArr.length); ^ ..\Playground\:8: error: class, interface, or enum expected } ^ 9 errors what it really means? if it gets total length of the array 5 ,why dont it accept the input with in the array size?