摘要:
package com.liaojianya.chapter2; /** * static关键字的使用 * @author LIAO JIANYA * 2016年7月28日 */ public class StaticDemo { public static void main(String[] a 阅读全文
摘要:
总结: 1、数据库操作: 创建库: create database db_name; 查询库: show databases; //显示所有的数据库 show create databases db_name; //显示特定的数据库 删除库 : drop database db_name; 修改库 阅读全文
摘要:
package com.liaojianya.chapter1; import java.util.Scanner; /** * This program demonstrates the way of judging leap year. * @author LIAO JIANYA * 2016年 阅读全文
摘要:
写一段程序来阐述数组简单的应用 package com.liaojianya.chapter1; import java.util.Random; /** * This program demonstrates the use of array. * @author LIAO JIANYA * 20 阅读全文
摘要:
编写程序,对数组进行排序,使用冒泡法排序,并增加随机性,使得数组乱序输出。 package com.liaojianya.chapter1; import java.util.ArrayList; import java.util.List; import java.util.Random; /** 阅读全文
摘要:
package com.liaojianya.chapter1; /** * This program demonstrates the difference between == and equals(). * @author LIAO JIANYA * 2016年7月20日 */ public 阅读全文
摘要:
package com.liaojianya.chapter1; /** * This program demonstrates the use of recursion method. * Implementing 1 + 2 + 3 + ... + n. * @author LIAO JIANY 阅读全文
摘要:
下面的程序阐述了值传递与应用传递的区别。 package com.liaojianya.chapter1; /** * This program demonstrates the use of array reference. * @author LIAO JIANYA * 2016年7月21日 * 阅读全文
摘要:
程序1 需求:建立一个人类(Person)和学生类(Student)功能如下: 1)Person包含4个数据成员name、addr、gender和age,分别表示姓名、地址、类别和年龄。设计一个输出方法talk()来显示这4个属性。 2)Student类继承Person类,并增加成员Math和Eng 阅读全文
摘要:
方法一: package com.liaojianya.chapter1; import java.util.Scanner; public class SwitchDemo1 { public static void main(String[] args) { Scanner input = ne 阅读全文
摘要:
程序1:简单的接口功能 package com.liaojianya.chapter2; /** * 编写程序实现一个usb接口,定义设备来使用这个接口,从而计算机可以调用具有usb接口的设备。 * @author LIAO JIANYA * 2016年7月27日 */ public class I 阅读全文
摘要:
先前看到一个技术大牛写了一个关于静态成员与非静态成员,静态方法和非静态方法的各自区别,觉得挺好的,在这里写一个小程序来说明这些区别。 package com.liaojianya.chapter5; /** * This program will demonstrate the use of sta 阅读全文