+ 2
how to convert this scanf in java?
how to conver this scanf("%d,&a[i]); in java? i already have Scanner scan = newScanner(System.in)
1 ответ
0
// for scan integer from standard input
int i=0, a[] = new int[5];
Scanner sc = new Scanner(System.in);
a[i] = sc.nextInt();
there is also Scanner.findInLine(regex) for more complex format scan