Java?л????????????????????
???????????? ???????[ 2012/11/6 9:48:41 ] ????????
???????????????У????????????????????е??£???Java?????????c?????????????scanf()??C++??????????cin()??????????????????????Java?????????????????????????????????????????????????????????????????
??????????г??????????
????????????????????????????????????????
public static void main(String [] args) throws IOException{
System.out.print("Enter a Char:");
char i = (char) System.in.read();
System.out.println("your char is :"+i);
}
}
????????????????????????????????????System.out.read()?????????????????????????????????????????????char???????????????????????????????????????????????????????????е???????????????????鷳??
??????????????????????????????????????????????????????У???????????BufferedReader???InputStreamReader??
public static void main(String [] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = null;
System.out.println("Enter your value:");
str = br.readLine();
System.out.println("your value is :"+str);
}
????????????????????????????????
??????????????????????????????????????Scanner??
public static void main(String [] args) {
Scanner sc = new Scanner(System.in);
System.out.println("???????????????");
String name = sc.nextLine();
System.out.println("?????????????");
int age = sc.nextInt();
System.out.println("?????????????");
float salary = sc.nextFloat();
System.out.println("?????????£?");
System.out.println("??????"+name+"
"+"????"+age+"
"+"?????"+salary);
}
??????δ????????????Scanner?????????????????????????????float??????????????????СС???????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11