為啥寫和視頻寫的一樣,但是運行之后中文全變成亂碼了???是設置有問題嗎?
public?static?void?main(String[]?args)?{
????System.out.print("請輸入您的初始成績:");
????int?score?=?new?Scanner(System.in).nextInt();
????int?count?=?0;
????System.out.println("加分前成績:"+score);
????while?(score<60){
????????score++;
????????count++;
????}
????System.out.println("加分后成績:"+score);
????System.out.println("共加了"+count+"次!");
}
2022-09-23
IDEA里面要設置UTF-8