java吧 关注:1,232,901贴子:12,700,317
  • 0回复贴,共1

百度知道提了个问。。没人理我,就来本吧来找大神了

只看楼主收藏回复

for(int ctr = 0; ctr< 5;ctr++)
{
System.out.print("enter the name of the shoes: ");
title = keyboard.nextLine();
System.out.print("Enter purchase price: ");
purchasePrice = keyboard.nextDouble();
System.out.print("Enter colletible price: ");
collectiblePrice = keyboard.nextDouble();
writeFile.write(title);
writeFile.newLine();
writeFile.write(String.valueOf(purchasePrice));
writeFile.newLine();
writeFile.write(String.valueOf(collectiblePrice));
writeFile.newLine();
title = keyboard.nextLine();
}
这几个代码为何不能把五次数据都写入datafile里?。。。


来自Android客户端1楼2015-01-15 22:24回复