Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to use System.in.read() or other methods to enter values ??into an integer array through keyboard input in JAVA?
How to use System.in.read() or other methods to enter values ??into an integer array through keyboard input in JAVA?

input:\x0d\12 23 34 23\x0d\output:\x0d\12 \x0d\23\x0d\34\x0d\23\x0d\import java.io.BufferedReader;\x0d\ import java.io.IOException;\x0d\import java.io.InputStreamReader;\x0d\public class test{\x0d\ public static void main(String[] args) throws IOException{ \x0d\ // Create input stream object\ x0d\ BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\x0d\ // Read a line of information\x0d\ String input = reader.readLine();\x0d\ // Use space as delimiter to convert into an array\x0d\ String[] numbers = input.split(" "); \x0d\ for(int j=0;j