+ 1

Fine the error and write the correct one?

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner ob= new Scanner (System.in); int a[] = new int[10]; for(int i=0;i<a.lenght;i++) a[i]=ob.nextInt(); for(int i=0;i<a.lenght;i++) System.out.print(a[i]+" "); } }

19th Apr 2018, 6:44 AM
Shamsulhaq Alkozay
Shamsulhaq Alkozay - avatar
1 Antwort
+ 2
length is written wrong inside the for parenthesis
19th Apr 2018, 6:46 AM
voidneo