Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - About the input and output of java
About the input and output of java
Class work {

Public static void main(String args[])

Throw java.io.IOException {

Byte b[] = new byte [100];

String s;

int i = 0,j = 0,c = 0;

I = system . in . read(b);

S = new string (b, 0, i);

c = integer . parse int(s . trim());

System.out.print ("output:"+c ");

}

}

S = new string (b, 0, i);

The S string you created here has spaces. It is right to remove the spaces before and after and turn it into plastic.

Byte b[] = new byte [100]; Read your group 100 and use it to create a string with many spaces. It is recommended to use the upstairs method to read the contents of the stream.