段階2です
This commit is contained in:
@@ -11,46 +11,36 @@ public class StringCheck {
|
||||
|
||||
//System.out.println(message[2]);
|
||||
|
||||
|
||||
for (int i = 0; i < message.length; i++) {
|
||||
System.out.println(message[i]);
|
||||
}
|
||||
|
||||
while(true) {
|
||||
// for (int i = 0; i < message.length; i++) {
|
||||
// System.out.println(message[i]);
|
||||
// }
|
||||
|
||||
while (true) {
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
System.out.println(message[0]);
|
||||
String str = scanner.nextLine().strip();
|
||||
|
||||
System.out.println("");
|
||||
System.out.println(message[3]);
|
||||
System.out.println(str);
|
||||
|
||||
int strlen = str.length();
|
||||
boolean isEmpty = strlen == 0;
|
||||
boolean isOver = ((140 - strlen) <= 0);
|
||||
|
||||
if (isEmpty == true) {
|
||||
System.out.println(message[1]);
|
||||
continue;
|
||||
// System.out.println(isEmpty);
|
||||
} else if (isOver == true) {
|
||||
System.out.println(message[2]);
|
||||
continue;
|
||||
} else {
|
||||
System.out.println("");
|
||||
System.out.println(message[3]);
|
||||
System.out.println(str);
|
||||
} break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// int strlen = str.length();
|
||||
//
|
||||
// boolean isEmpty = strlen == 0;
|
||||
// System.out.println(message[1]);
|
||||
// System.out.println(isEmpty);
|
||||
//
|
||||
//
|
||||
// boolean isOver = ((140 - strlen) <= 0);
|
||||
// //System.out.println(message[2]);
|
||||
// System.out.println(isOver);
|
||||
//
|
||||
// System.out.println("残り入力可能文字数" + (140-strlen));
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// boolean isMessage = (140 >= strlen);
|
||||
}
|
||||
|
||||
// System.out.println("残り入力可能文字数" + (140-strlen));
|
||||
|
||||
// boolean isMessage = (140 >= strlen);
|
||||
}
|
||||
Reference in New Issue
Block a user