問題③
This commit is contained in:
@@ -15,6 +15,20 @@ public class StringCheck {
|
|||||||
|
|
||||||
// အလုပ်လုပ်ပုံ စစ်ဆေးရန်အတွက် str ၏ ပါဝင်မှုကို ပြသခြင်း
|
// အလုပ်လုပ်ပုံ စစ်ဆေးရန်အတွက် str ၏ ပါဝင်မှုကို ပြသခြင်း
|
||||||
System.out.println("入力値: [" + str + "]");
|
System.out.println("入力値: [" + str + "]");
|
||||||
|
|
||||||
|
//問題3
|
||||||
|
boolean isEmpty = (str.length() == 0); // empty ckeck空文字判定:str の文字数が 0 かどうか
|
||||||
|
boolean isTooLong = (str.length() > 140); // limit spelling str の文字数が 140 を超えるかどうか
|
||||||
|
int remainingLength = 140 - str.length(); //残り入力可能文字数(140 - 文字数)
|
||||||
|
|
||||||
|
//空行を1行表示する (fill the enter)
|
||||||
|
System.out.println();
|
||||||
|
|
||||||
|
// take out arrage string number 2
|
||||||
|
System.out.println(messages[3]);
|
||||||
|
|
||||||
|
// print input string
|
||||||
|
System.out.println(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user