import java.util.*;
import java.io.*;
public class serverstrcheck
{
private FileWriter fw = null;
private File out = new File("JOIN.txt");
private PrintWriter pw = null;
public void serverstrcheck(String k)
{
String[] strs = k.split("!");
int num = Integer.parseInt(strs[0]);
if(num==0)
{
join(strs[1]);
}
}
public void join(String k)
{
try
{
if(out.exists())
{
fw = new FileWriter(out);
pw = new PrintWriter(fw);
pw.println(k);
pw.flush();
pw.close();
}
}
catch(Exception e)
{
}
}
}
형들 이렇게 하면 파일에 글 넣을때 한번에 한개씩 쓰이기만 하던데 덧붙혀서 계속 쓰려면 어떻게 해야돼??
자바 너무 어렵다
++ 연산자