• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






一曲相思

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2019年4月8日

冒泡练习
摘要: int[] arr=new int[10]; for(int i=0;i<arr.length;i++){ arr[i]}=(int)Math.random()*100; } for(int i=0;i<arr.length;i++){ for(int j=0;j<arr.length-1-i;j+ 阅读全文
posted @ 2019-04-08 17:07 一世红尘 阅读(139) 评论(0) 推荐(0)
 
判断整型数据奇偶数
摘要: public boolean number(int number){ return number%2!=1; } public boolean number(int number){ return number&1==1; } 阅读全文
posted @ 2019-04-08 16:44 一世红尘 阅读(154) 评论(0) 推荐(0)
 

2019年3月25日

一个网友遇到的重载问题
摘要: public static void main(String[] args){ int c=add(5, 6); System.out.println(c); add(new Integer(6),new Integer(7)); } public static int add(int a,int 阅读全文
posted @ 2019-03-25 12:14 一世红尘 阅读(119) 评论(0) 推荐(0)
 

2019年3月16日

mybatis配置文件
摘要: mybatis-config.xml <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE configurationPUBLIC "-//mybatis.org//DTD Config 3.0//EN""http://mybatis.org/dtd/myb 阅读全文
posted @ 2019-03-16 15:45 一世红尘 阅读(122) 评论(0) 推荐(0)
 

2019年3月13日

生成随机姓名
摘要: public class Demo { @Test public void test01() throws UnsupportedEncodingException{ Random r=new Random(); for(int i=0 ;i<100;i++){ StringBuffer name= 阅读全文
posted @ 2019-03-13 11:33 一世红尘 阅读(1194) 评论(0) 推荐(0)
 
自定义框架
摘要: public class JDBC { private static Connection conn=null; static{ try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { e. 阅读全文
posted @ 2019-03-13 00:12 一世红尘 阅读(218) 评论(0) 推荐(0)
 

2019年2月13日

OutputStream copy file
摘要: public class OutputStreamTest{ public static void main(String[] args){ streamCopy(); streamArrayCopy(); } public static void streamCopy(){ InputStream 阅读全文
posted @ 2019-02-13 23:38 一世红尘 阅读(196) 评论(0) 推荐(0)
 

2019年2月12日

mysql 连接02
摘要: public static void main(String[] args){ Class.forName("com.mysql.jdbc.Driver"); Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:33 阅读全文
posted @ 2019-02-12 10:40 一世红尘 阅读(79) 评论(0) 推荐(0)
 

2019年2月11日

InputStreamReader
摘要: public class Test { public static void main(String[] args) throws IOException { //转换流以单个英文或单个中文为一个字符读取可直接转换为char类型输出 InputStreamReader input=new Input 阅读全文
posted @ 2019-02-11 17:22 一世红尘 阅读(212) 评论(0) 推荐(0)
 
mysql 连接01
摘要: public class MySqlTest{ public static void main(String[] args) throws Exception{ Class.forName("com.mysql.jdbc.Driver"); Connection conn=DriverManager 阅读全文
posted @ 2019-02-11 16:54 一世红尘 阅读(114) 评论(0) 推荐(0)
 
下一页