Day2 stept 4
This commit is contained in:
@@ -21,12 +21,11 @@ public class StringCheck {
|
|||||||
|
|
||||||
//System.out.println("あなたの入力は: [" + str + "]");
|
//System.out.println("あなたの入力は: [" + str + "]");
|
||||||
|
|
||||||
|
|
||||||
//2段階のif
|
//2段階のif
|
||||||
boolean isEmpty = str.isEmpty();
|
boolean isEmpty = str.isEmpty();
|
||||||
boolean isTooLong = str.length() > 140;
|
boolean isTooLong = str.length() > 140;
|
||||||
|
|
||||||
if(isEmpty) {
|
if (isEmpty) {
|
||||||
System.out.println(messages[1]);
|
System.out.println(messages[1]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -37,7 +36,6 @@ public class StringCheck {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
System.out.println();
|
System.out.println();
|
||||||
@@ -46,8 +44,5 @@ public class StringCheck {
|
|||||||
|
|
||||||
scan.close();
|
scan.close();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user