摘要: package Test; import java.sql.*; public class Test7 { public static void main(String[] args) { Connection con=null; CallableStatement csta=null; try { 阅读全文
posted @ 2016-10-17 22:50 ruiguang21 阅读(1287) 评论(0) 推荐(0) 编辑
摘要: public class Test34 { public static void main(String[] args) { File f=new File("f:"); File [] fl=f.listFiles(); for(File fls:fl) { System.out.println( 阅读全文
posted @ 2016-10-13 12:26 ruiguang21 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2016-10-12 22:56 ruiguang21 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2016-10-12 22:38 ruiguang21 阅读(190) 评论(0) 推荐(0) 编辑
摘要: public class Test{ public static void main(String [] args) { Test t=new Test(); t.upload(); } public void upload() { Scanner sc=new Scanner(System.in) 阅读全文
posted @ 2016-10-12 22:28 ruiguang21 阅读(485) 评论(0) 推荐(0) 编辑
摘要: char的字符数据类型,是无符号型的,占2个字节;大小范围是0-65535; byte是字节数据类型,是有符号型的,占1个字节;大小范围为-128-127; 1, char c1=3; char c=(char)-3;//char不能识别负数,因为char的范围在(0-65535) //必须进行强制 阅读全文
posted @ 2016-10-12 09:27 ruiguang21 阅读(7027) 评论(0) 推荐(0) 编辑
摘要: public static void show() { File f=new File("d:"+File.separator+"1.txt"); FileOutputStream fo=new FileOutputStream(f,ture); String str="你好"; fo.erite( 阅读全文
posted @ 2016-10-12 08:16 ruiguang21 阅读(318) 评论(0) 推荐(0) 编辑
摘要: public abstract class animal { protected String name; public animal(String name) { super(); this.name = name; } public String getName() { return name; 阅读全文
posted @ 2016-10-12 08:04 ruiguang21 阅读(1334) 评论(0) 推荐(0) 编辑
摘要: 简单地说,JDBC 可做三件事:与数据库建立连接、发送 SQL 语句并处理结果。下列代码段给出了以上三步的基本示例: Connection con = DriverManager.getConnection("jdbc:odbc:wombat","login", "password"); State 阅读全文
posted @ 2016-10-10 22:37 ruiguang21 阅读(83) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { Map <String ,Integer> m =new HashMap<String , Integer>(); Scanner sc=new Scanner(System.in); String str=sc.ne 阅读全文
posted @ 2016-10-10 22:30 ruiguang21 阅读(171) 评论(0) 推荐(0) 编辑