段階3 小澤
This commit is contained in:
@@ -11,13 +11,21 @@ public class StringCheck {
|
|||||||
comment[3] = "\"↓↓↓↓↓↓ 投稿されました ↓↓↓↓↓↓\"";
|
comment[3] = "\"↓↓↓↓↓↓ 投稿されました ↓↓↓↓↓↓\"";
|
||||||
|
|
||||||
|
|
||||||
System.out.println("いまなにしてる?");
|
System.out.println(comment[0]);
|
||||||
Scanner scanner = new Scanner(System.in);
|
Scanner scanner = new Scanner(System.in);
|
||||||
String text = scanner.next();
|
String text = scanner.next();
|
||||||
String str = text.strip();
|
String str = text.strip();
|
||||||
|
System.out.println("\n" + comment[3]);
|
||||||
System.out.println(str);
|
System.out.println(str);
|
||||||
|
|
||||||
|
|
||||||
|
boolean isStr0 = str.length() == 0;
|
||||||
|
boolean isStr140 = str.length() > 140;
|
||||||
|
System.out.println(isStr0);
|
||||||
|
System.out.println(isStr140);
|
||||||
|
|
||||||
|
System.out.println(140-str.length());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user