Computer Science, asked by Anonymous, 3 months ago


\large\fbox{\fbox\red{\fbox{Question:-}}}


WAP in Java to read the input as a single line "

Abc 19.45 17 Rohit G ".​

Answers

Answered by utsavsinghal
1

Answer:

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

String lines = br.readLine();

String[] strs = lines.trim().split("\\s+");

for (int i = 0; i < strs.length; i++) {

a[i] = Integer.parseInt(strs[i]);

}

Explanation:

Mark me as Brainliest

Similar questions