ページの作成:「(String).isEmpty [https://docs.oracle.com/javase/jp/8/docs/api/java/lang/String.html#isEmpty--]<br> public boolean isEmpty() 空文字か調べます。length()が0…」
 
編集の要約なし
4行目: 4行目:
空文字か調べます。length()が0の場合にのみ true を返します。
空文字か調べます。length()が0の場合にのみ true を返します。


  if (input.isEmpty()) {
  if (s.isEmpty()) {
     System.out.println("Please type something...");
     System.out.println("Please type something...");
  }
  }

2019年5月31日 (金) 09:36時点における版

(String).isEmpty [1]
public boolean isEmpty()

空文字か調べます。length()が0の場合にのみ true を返します。

if (s.isEmpty()) {
    System.out.println("Please type something...");
}