摘要: package duixiang;public class Car { // 品牌 private String pinpai; // 读 public String getPinpai() { return pinpai; } // 写 pu... 阅读全文
posted @ 2015-12-14 08:53 琦仔 阅读(160) 评论(0) 推荐(0) 编辑
摘要: package com.hanqi;public class Phone { private String pinPai;//品牌 public String getPinPai() { return pinPai; } public vo... 阅读全文
posted @ 2015-12-14 08:52 琦仔 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-12-07 18:23 琦仔 阅读(96) 评论(0) 推荐(0) 编辑
摘要: public class JiDan { public static void main(String[] args) { // 公鸡 a = 2;母鸡 b = 1; 小鸡 c = 0.5; // 用100文钱,买100只鸡 int a ... 阅读全文
posted @ 2015-12-07 08:39 琦仔 阅读(129) 评论(0) 推荐(0) 编辑
摘要: public class XQ { public static void main(String[] args) { int sum = 0; for(int i = 1; i <= 100;i++) { if((i % 7 =... 阅读全文
posted @ 2015-12-07 08:38 琦仔 阅读(1043) 评论(0) 推荐(0) 编辑
摘要: 二分查找法一般指二分查找二分查找又称折半查找,优点是比较次数少,查找速度快,平均性能好;其缺点是要求待查表为有序表,且插入删除困难。因此,折半查找方法适用于不经常变动而查找频繁的有序列表。首先,假设表中元素是按升序排列,将表中间位置记录的关键字与查找关键字比较,如果两者相等,则查找成功;否则利用中间... 阅读全文
posted @ 2015-12-06 19:36 琦仔 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-12-06 19:33 琦仔 阅读(362) 评论(0) 推荐(0) 编辑
摘要: public class maxandmin { public static void main(String[] args) { int i[]=new int[]{0,1,5,4,9,2,4,8,15}; int c = 1; int b = ... 阅读全文
posted @ 2015-12-06 19:30 琦仔 阅读(473) 评论(0) 推荐(0) 编辑
摘要: public class maopao { public static void main(String[] args) { //冒泡排序 int[]array={12,22,13,44,11,33}; for(int ... 阅读全文
posted @ 2015-12-06 19:30 琦仔 阅读(90) 评论(0) 推荐(0) 编辑
摘要: ublic class 随机数 { public static void main(String[] args) { for(int s=1;s<=7;s++){ int x=(int)(Math.random()*36); if(x!=0){ ... 阅读全文
posted @ 2015-12-06 19:28 琦仔 阅读(296) 评论(0) 推荐(0) 编辑