4段階終わりました
This commit is contained in:
@@ -21,7 +21,7 @@ public class StringCheck {
|
|||||||
|
|
||||||
System.out.println(classNames[0]);
|
System.out.println(classNames[0]);
|
||||||
str = scan.nextLine();
|
str = scan.nextLine();
|
||||||
|
|
||||||
// 前後の空白を除去した文字列
|
// 前後の空白を除去した文字列
|
||||||
String trimmed = str.strip();
|
String trimmed = str.strip();
|
||||||
|
|
||||||
@@ -41,20 +41,19 @@ public class StringCheck {
|
|||||||
if (isEmpty) {
|
if (isEmpty) {
|
||||||
System.out.println(classNames[1]);
|
System.out.println(classNames[1]);
|
||||||
continue;
|
continue;
|
||||||
} else if (isOverLimit) {
|
}
|
||||||
|
if (isOverLimit) {
|
||||||
System.out.println(classNames[2]);
|
System.out.println(classNames[2]);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
System.out.println();
|
||||||
|
System.out.println(classNames[3]);
|
||||||
|
//読み込んだ文字列の前後にある空白文字を除去
|
||||||
|
System.out.println(str.strip());
|
||||||
|
break;
|
||||||
|
|
||||||
System.out.println();
|
}
|
||||||
System.out.println(classNames[3]);
|
|
||||||
//読み込んだ文字列の前後にある空白文字を除去
|
|
||||||
System.out.println(str.strip());
|
|
||||||
scan.close();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user