:: reverse dictionary ::
※ソースファイルについて
◎各マークの意味
Pb:pubic Pr:protected S:static
文字列が指定した接頭辞で始まるかどうかを調べるには、対象の文字列の startsWith メソッドを使います。
String str = "sample01.txt"; boolean fa = str.startsWith("samp"); boolean fb = str.startsWith("samp"); boolean fc = str.startsWith("sample10");
fa は true 、fb は false 、fc は false になります。
java.lang.String Pb boolean startsWith(String s)
対象の文字列が接頭辞 s で始まるかどうかを調べます。
接頭辞 s で始まる場合は true 、始まらない場合は false を返します。
s … 調べる接頭辞
・接頭辞 s で始まる … true
・接頭辞 s で始まらない … false
NullPointerExceptionnull の場合
Copyright (C) 2005-2007 Noto Watabe. All rights reserved.
e-mail:wmh@always-pg.com