|
|
|
|
|
摘要:
package object01; interface Eatable { void taste();} interface Flyable { void fly(String weather);} interface Addable { double add(int a, double b);} 阅读全文
posted @ 2019-01-22 20:00
Lovemeifyoudare
阅读(151)
推荐(0)
编辑
摘要:
package object01; public enum Season { //定义枚举类 spring, summer, autumn, winter;} //测试 public class EnumTest { public void judge(Season a) { switch (a) 阅读全文
posted @ 2019-01-22 19:53
Lovemeifyoudare
阅读(85)
推荐(0)
编辑
摘要:
package object01; public interface Command {//定义一个接口 让其他类去实现 void pArray(int[] arr); //打印数组 int addArray(int[] arr); //数组求和} public class InplementArr 阅读全文
posted @ 2019-01-22 19:44
Lovemeifyoudare
阅读(207)
推荐(0)
编辑
摘要:
建立一个包含学生、家长、老师、班级的学校管理模型,系统录入、查询学生信息、家长信息、老师,以及班级的信息,注意,要建立各信息间的关联 //学生类 package demo; public class Student { private String name; private int Cid; pr 阅读全文
posted @ 2019-01-22 18:31
Lovemeifyoudare
阅读(228)
推荐(0)
编辑
摘要:
package baseClass7; import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.util.Map;import java.u 阅读全文
posted @ 2019-01-22 18:22
Lovemeifyoudare
阅读(100)
推荐(0)
编辑
摘要:
package baseClass7; public class StringBuilderClass { public static void main(String[] args) { String s1 = "chaoqiqiang.chaoqq.cqq"; String s2 = ".cha 阅读全文
posted @ 2019-01-22 18:21
Lovemeifyoudare
阅读(90)
推荐(0)
编辑
摘要:
package baseClass7; import java.io.IOException; public class RuntimeTest { public static void main(String[] args) { // 获取Java程序关联的运行时对象 Runtime rt = R 阅读全文
posted @ 2019-01-22 18:08
Lovemeifyoudare
阅读(91)
推荐(0)
编辑
摘要:
public class RecursionJJ { public static void main(String args[]) { m(9); } public static void m(int i) { if (i == 1) { System.out.println("1*1=1 "); 阅读全文
posted @ 2019-01-22 18:02
Lovemeifyoudare
阅读(269)
推荐(0)
编辑
摘要:
public class YmDay { public static void main(String[] args) { int year = 2009, month = 1, day = 8; int m2; if (year % 100 == 0 && year % 400 == 0 || y 阅读全文
posted @ 2019-01-22 17:49
Lovemeifyoudare
阅读(502)
推荐(0)
编辑
摘要:
public class Shuzunixu { public static void main(String arg[]) { Array(new int[] { 1, 2, 3, 4, 5, 6 }); } public static void Array(int arr[]) { for (i 阅读全文
posted @ 2019-01-22 17:30
Lovemeifyoudare
阅读(198)
推荐(0)
编辑
摘要:
public class Shuzu { public static void main(String arg[]) { printArray(new int[] { 1, 2, 3 }); } public static void printArray(int[] arr) { System.ou 阅读全文
posted @ 2019-01-22 17:22
Lovemeifyoudare
阅读(143)
推荐(0)
编辑
摘要:
public class Select { public static void main(String[] args) { selectArray(new int[] { 6, 73, 23, 15, 45, 20, 56, 3, 89 }); } public static void selec 阅读全文
posted @ 2019-01-22 17:16
Lovemeifyoudare
阅读(321)
推荐(0)
编辑
摘要:
package test; public class Maopao { public static void main(String[] args) { array(new int[] { 6, 73, 23, 15, 45, 20, 56, 3, 89 }); } public static vo 阅读全文
posted @ 2019-01-22 16:57
Lovemeifyoudare
阅读(106)
推荐(0)
编辑
摘要:
import java.util.Arrays; public class Kong { public static void main(String[] args) { int[] arr = { 'a',99, 93, 92, 97, 'b' }; int[] arr2 = {97, 'c', 阅读全文
posted @ 2019-01-22 16:16
Lovemeifyoudare
阅读(1164)
推荐(0)
编辑
摘要:
package test; public class HanZhuanMa { public static void main(String[] args) { String cn = "麒强"; System.out.println(cnToUnicode(cn));// 输出\u9e92\u5f 阅读全文
posted @ 2019-01-22 16:09
Lovemeifyoudare
阅读(660)
推荐(0)
编辑
摘要:
public class DXX { public static void main(String []args){ char dx='A',xx='a'; for(int i=0;i<26;i++,dx++,xx++){ System.out.println("大写字母:"+dx+",小写字母:" 阅读全文
posted @ 2019-01-22 16:05
Lovemeifyoudare
阅读(294)
推荐(0)
编辑
摘要:
public class Employee {//员工类 private String name; private int number; private double salary; private double bonus; private Employee leader; private De 阅读全文
posted @ 2019-01-22 15:50
Lovemeifyoudare
阅读(254)
推荐(0)
编辑
摘要:
package objectUp; class BaseClass { public BaseClass() { String book = "caa"; this.test(); } public void base() { System.out.println("我是父类的方法"); } pub 阅读全文
posted @ 2019-01-22 15:24
Lovemeifyoudare
阅读(99)
推荐(0)
编辑
摘要:
package objectUp; public class recursion { /* * 已知一个数列:(f0) =1,(f1)=4, f(n +2)=2*f(n+1) +f(n),其中n是大于0的整数,求 f(n)的值。 * * 倒过来:f(20)=1,f(21)=4,f(n +2)=2*f 阅读全文
posted @ 2019-01-22 14:53
Lovemeifyoudare
阅读(234)
推荐(0)
编辑
摘要:
package objectUp; public class InstanceofTest { /* * instanceof(译:实例 判断对象类型 运算符)运算符前一个操作数 通常是一个引用类型变量 后一个操作数通常是类或接口(接口是一个特殊的类) * 用于判断前面的对象是否是后面的类 或者是他 阅读全文
posted @ 2019-01-22 14:46
Lovemeifyoudare
阅读(152)
推荐(0)
编辑
|
|