“约翰”,“ 100.00”,“ 200.00”
如何读取文本文件的内容,然后在引号下打印字符串。
输出应为Jhon 100.00 200.00
String CUSTOMER, CURRENT, NEW;
Scanner sc = new Scanner(str);
sc.useDelimiter(",");
while(sc.hasNext()){
CUSTOMER = sc.next();
CURRENT = sc.next();
NEW = sc.next();
System.out.println("" + CUSTOMER + " " + CURRENT +
" " + NEW);
}
sc.close();
如何将标记与引号分开。我得到的上述代码的输出是“ Jhon”“ 100.00”“ 200.00”
慕仙森
相关分类