- import java.io.* ;
- class Input
- {
- public static void main(String[] args) throws IOException
- {
- System.out.println(input());
- }
- public static String input() throws IOException{
- BufferedReader buf = new BufferedReader(
- new InputStreamReader(System.in)) ; //这句死记硬背也要背下来
- return buf.readLine() ;
- }
- }
复制代码 不建议用scanner。毕竟多多练习IO流才是正义!
想多次输入,把input放进循环里就行,很简单吧
|