회사는 정말 싫어욧

Save {

String text = editText.getText().toString();

editText.setText("");

try {

OutputStream os = openFileOutput("data.txt",MODE_PRIVATE);

PrintWriter pw = new PrintWriter(os);

pw.append(text + "\n");

pw.flush();

pw.close();

os.close();


} catch (Exception e) {

}



Load{

try {

InputStream is = openFileInput("data.txt");

Scanner sc = new Scanner(is,"UTF-8");

while (sc.hasNextLine()) {

textView.append(sc.nextLine() +"\n");


}

} catch (Exception e) {

}