2015年5月24日
摘要: 一、创建类:Test.java//定义类public class Test{ //属性 String name; String gender; int age; //方法,无参无返回 public void eat(){ System.out... 阅读全文
posted @ 2015-05-24 21:56 鱼塘总裁 阅读(3576) 评论(0) 推荐(2)
摘要: 实例://数组选择排序算法import java.util.Scanner;public class Test{ public static void main(String[] args){ int[] arr = {23,12,45,24,87,65,13,14}... 阅读全文
posted @ 2015-05-24 21:15 鱼塘总裁 阅读(343) 评论(0) 推荐(0)
摘要: 实例(从小向大排序)://数组冒泡算法import java.util.Scanner;public class Test{ public static void main(String[] args){ int[] arr = {23,12,45,24,87,65,... 阅读全文
posted @ 2015-05-24 13:39 鱼塘总裁 阅读(548) 评论(0) 推荐(0)
摘要: 一、复制数组算法//数组复制算法public class Test{ public static void main(String[] args){ int[] arrA = {100,800,500,600,700}; int[] arrB... 阅读全文
posted @ 2015-05-24 13:09 鱼塘总裁 阅读(3124) 评论(0) 推荐(0)
摘要: 一、数组升序排序实例:import java.util.Arrays; //导入数组处理public class Test{ public static void main(String[] args){ int[] arr = new int[5]; ... 阅读全文
posted @ 2015-05-24 10:56 鱼塘总裁 阅读(580) 评论(0) 推荐(0)
摘要: 实例:import java.util.*;//求学生最大成绩public class Test{ public static void main(String[] args){ System.out.println("=======求学生最大成绩========="); ... 阅读全文
posted @ 2015-05-24 10:21 鱼塘总裁 阅读(4484) 评论(0) 推荐(0)
摘要: 实例:知识点:数组名.length是计算数组的长度import java.util.*;//求学生平均分成绩public class Test{ public static void main(String[] args){ Scanner in = new Scan... 阅读全文
posted @ 2015-05-24 09:57 鱼塘总裁 阅读(3458) 评论(0) 推荐(0)
摘要: 一、声明数组:public class Test{ public static void main(String[] args){ int[] arr = new int[5]; //声明数组,并赋值最大有5个,下标是0-4 arr[1] ... 阅读全文
posted @ 2015-05-24 00:27 鱼塘总裁 阅读(337) 评论(0) 推荐(0)