会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ruiguang21
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
下一页
2016年10月17日
使用CallableStatement的用法
摘要: 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
阅读(1333)
评论(0)
推荐(0)
2016年10月13日
使用File查询出所有的文件和目录的信息
摘要: 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
阅读(302)
评论(0)
推荐(0)
2016年10月12日
使用File类列出指定位置下的文件及目录信息
摘要: 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
阅读(273)
评论(0)
推荐(0)
使用File类列出指定位置的文件信息,包含该路径子目录下的文件信息
摘要: 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
阅读(193)
评论(0)
推荐(0)
复制文件的问题:使用FileInputStream和FileOutputStream实现文件复制
摘要: 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
阅读(496)
评论(0)
推荐(0)
char和byte的区别
摘要: 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
阅读(7100)
评论(0)
推荐(0)
FileOutputStream和FileInputStream的用法
摘要: 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
阅读(322)
评论(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
阅读(1356)
评论(0)
推荐(0)
2016年10月10日
JDBC编程
摘要: 简单地说,JDBC 可做三件事:与数据库建立连接、发送 SQL 语句并处理结果。下列代码段给出了以上三步的基本示例: Connection con = DriverManager.getConnection("jdbc:odbc:wombat","login", "password"); State
阅读全文
posted @ 2016-10-10 22:37 ruiguang21
阅读(86)
评论(0)
推荐(0)
泛型:HashMap的用法--输入字母输出数目
摘要: 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
阅读(175)
评论(0)
推荐(0)
上一页
1
2
3
下一页
公告