day2 段階1再提出
This commit is contained in:
@@ -21,24 +21,26 @@ public class StringCheck_shimizu {
|
||||
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
|
||||
String Str = "";
|
||||
|
||||
while (true) {
|
||||
|
||||
//"いまなにしてる?"
|
||||
System.out.println(messages[0]);
|
||||
|
||||
//入力された文字を取得
|
||||
String Str = scanner.nextLine().strip();
|
||||
Str = scanner.nextLine().strip();
|
||||
|
||||
//"何も入力されていません"
|
||||
boolean isEnpty = Str.length() == 0;
|
||||
System.out.println(isEnpty);
|
||||
//System.out.println(isEnpty);
|
||||
|
||||
//"投稿文が長すぎます"
|
||||
boolean ismojisu = Str.length() > 140;
|
||||
System.out.println(ismojisu);
|
||||
//System.out.println(ismojisu);
|
||||
|
||||
int nokori = 140 - Str.length();
|
||||
System.out.println(nokori);
|
||||
//System.out.println(nokori);
|
||||
|
||||
//空行
|
||||
System.out.println();
|
||||
|
||||
Reference in New Issue
Block a user