上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: 泛型(Generic type 或者generics)是对 Java 语言的类型系统的一种扩展,以支持创建可以按类型进行参数化的类。可以把类型参数看作是使用参数化类型时指定的类型的一个占位符,就像方法的形式参数是运行时传递的值的占位符一样。 在定义类或者接口的时候可以为类和接口指定类型形参,在定义变 阅读全文
posted @ 2016-05-23 21:40 凌零聆 阅读(177) 评论(0) 推荐(0) 编辑
摘要: package lianxi; public class Yuan { public static void main(String[] args) { double r=3.0; double circle=2*r*Math.PI; double area=Math.PI*r*r; System. 阅读全文
posted @ 2016-05-23 16:12 凌零聆 阅读(2663) 评论(0) 推荐(0) 编辑
摘要: package b; import java.util.Scanner; public class Zifuchuan { public static void main(String[] args) { System.out.println("输入字符串:"); Scanner zifu=new Scanner(System.in); ... 阅读全文
posted @ 2016-05-23 16:03 凌零聆 阅读(1447) 评论(1) 推荐(0) 编辑
摘要: package b; public class Rect { Double width; Double height; public Double getWidth() { return width; } public void setWidth(Double width) { this.width 阅读全文
posted @ 2016-05-23 15:17 凌零聆 阅读(2845) 评论(0) 推荐(0) 编辑
摘要: package b; public class Car { public final static Car pinpai=new Car(); public static Car instance() { return pinpai; } public void drive() { System.o 阅读全文
posted @ 2016-05-23 14:34 凌零聆 阅读(4363) 评论(0) 推荐(0) 编辑
摘要: package b; public class Person { private String name; private String address; private String telephone; private String email; public String getName() 阅读全文
posted @ 2016-05-23 11:57 凌零聆 阅读(4041) 评论(0) 推荐(0) 编辑
摘要: package zimu; public class A { public void f() { for (int i = 97; i <123; i++) { System.out.print((char)i); } System.out.println(); } } package zimu; 阅读全文
posted @ 2016-05-23 11:23 凌零聆 阅读(4563) 评论(0) 推荐(0) 编辑
摘要: public class A { private int a=1; public int getA() { return a; } public void setA(int a) { this.a = a; } public void a() { System.out.println("a="+a) 阅读全文
posted @ 2016-05-23 11:07 凌零聆 阅读(827) 评论(0) 推荐(0) 编辑
摘要: package jicheng; public class Monkey { private String s; public String getS() { return s; } public void setS(String s) { this.s = s; } public Monkey(S 阅读全文
posted @ 2016-05-23 08:58 凌零聆 阅读(376) 评论(0) 推荐(0) 编辑
摘要: package a; public class Instrument { public void play() { System.out.println("弹奏乐器"); } } package a; public class Wind extends Instrument { public voi 阅读全文
posted @ 2016-05-22 23:30 凌零聆 阅读(233) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页