摘要:
public static void main(String [] args) { File f=new File("C:"); File [] fl=f.listFiles(); for(int i=0;i<fl.length;i++) { if (fi[i].isDirectory()) { s 阅读全文
摘要:
public class Test{ public static void main(String [] args) { File f=new File("d:"); File [] fl=f.listFiles(); show(f1); } public static void show(File 阅读全文
摘要:
public class Test{ public static void main(String [] args) { Test t=new Test(); t.upload(); } public void upload() { Scanner sc=new Scanner(System.in) 阅读全文
摘要:
char的字符数据类型,是无符号型的,占2个字节;大小范围是0-65535; byte是字节数据类型,是有符号型的,占1个字节;大小范围为-128-127; 1, char c1=3; char c=(char)-3;//char不能识别负数,因为char的范围在(0-65535) //必须进行强制 阅读全文
摘要:
public static void show() { File f=new File("d:"+File.separator+"1.txt"); FileOutputStream fo=new FileOutputStream(f,ture); String str="你好"; fo.erite( 阅读全文
摘要:
public abstract class animal { protected String name; public animal(String name) { super(); this.name = name; } public String getName() { return name; 阅读全文