字符输入: char c = (char)System.in.read();
字符串输入:
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String str = buf.readLine();
(标准输出流 System.out )提供的如下方法
格式化可能会抛这个异常:
System.out.printf("%d", 123.45);
Exception in thread "main" java.util.IllegalFormatConversionException: d != java.lang.Double
Java string.format IllegalFormatConversionException_u014515854的博客-CSDN博客 https://blog.csdn.net/u014515854/article/details/78978279