File file = getFileStreamPath("text.txt");
if( file.isFile() == false ) {
String strBuf = ReadTextAssets("text.txt");
try {
File file = getFileStreamPath(strFileName);
FileOutputStream fos = new FileOutputStream(file);
Writer out = new OutputStreamWriter(fos, "UTF-8");
out.write(strBuf);
out.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
String s="abc"; // String형 s에 "abc"라는 초기값을 생성과 동시에 줌
boolean b1=s.startsWith("ab"); // startsWith는 반환값을 boolean형을 돌려준다.
boolean b2=s.startsWith("a"); // 하는 역할은 .으로 받은 변수를 ()안에 값으로
}
출처:
http://raoo.tistory.com/entry/startsWith의-간단한-예제 [자신(Java神)이 되자]