public class ISOtream1 {
public static void main(String[] args) {
<?> out = null;
try {
out = new <?>(new <?>(<?>));
out.<?>("would");
out.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
pcwiki 發表在 痞客邦 留言(0) 人氣(34)
public class Forest {
public static void main(String[] args){
DateFormat df = new DateFormat() {
@Override
public java.util.Date parse(String source, ParsePosition pos) {
// TODO Auto-generated method stub
return null;
}
@Override
public StringBuffer format(java.util.Date date, StringBuffer toAppendTo,
FieldPosition fieldPosition) {
// TODO Auto-generated method stub
return null;
}
};
Date date=new Date();
df.setLocale(Local.Ialy);
}
}
pcwiki 發表在 痞客邦 留言(0) 人氣(17)
public class Forest {
public static void main(String[] args){
String test = "This is a test";
String[] tokens = test.split("\s");
System.out.println(tokens.length);
}
}
pcwiki 發表在 痞客邦 留言(0) 人氣(95)
題目:
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
pcwiki 發表在 痞客邦 留言(0) 人氣(17)
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
public class Forest {
private Tree tree = new Tree();
public static void main(String[] args){
Forest f = new Forest();
try {
FileOutputStream fs = new FileOutputStream("Forest.ser");
ObjectOutputStream os = new ObjectOutputStream(fs);
os.writeObject(f);
os.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
class Tree{}
pcwiki 發表在 痞客邦 留言(0) 人氣(8)