自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

转载 Java关键字

1.abstractabstract 关键字可以修改类或方法。abstract 类可以扩展(增加子类),但不能直接实例化。abstract 方法不在声明它的类中实现,但必须在某个子类中重写。-示例-public abstract class MyClass{}public abstract String myMethod();-注释-采用 abstract 方法的类本来就是抽象类,并且必须声明为 abstract。abstract 类不能实例化。仅当 abstra

2010-10-12 15:04:00 271

原创 产生随机数并比较大小

<br />public static void main(String[] args) {<br />  int[] number = new int[10];<br />  System.out.println("随机产生的数列是:");<br />  for (int i = 0; i < 10; i++) {<br />   number[i] = (int) (Math.random() * 100 + 1);<br />   System.out.print(number[i] + "/t");

2010-10-12 11:02:00 1508

原创 水仙花数

<br />public static void main(String[] args) {<br />  for (int i=100;i<=999;i++){<br />   int numA=(i%10)*(i%10)*(i%10);<br />   int numB=(i/10%10)*(i/10%10)*(i/10%10);<br />   int numC=(i/100%10)*(i/100%10)*(i/100%10);<br />   if(i==(numA+numB+numC)){<br

2010-10-12 11:00:00 258

原创 万年历(包括显示系统时间)

public static void main(String[] args) throws Exception { int year; int month; int day = 0; int sumA = 0; int sumB = 0; System.out .println("* * * * * * * * * * * * * * * * * *欢迎使用万年历* * * * * * * * * * * * * * * * * */n "); Sca

2010-10-12 10:59:00 951

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除