自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

zy的博客

新手

  • 博客(7)
  • 收藏
  • 关注

转载 求两个数的商和余数 抛出异常

class Test { public static void main(String[] args) { int a, b, i = 0; try { a = Integer.parseInt(args[i]); i++; b = Integer.parseInt(args[i]); System.out.println("商为:" + a / b); S

2017-03-31 14:47:32 835

原创 定义一个课程类

class Course{ String cNumber; String cName; int cUnit; public static int cTotalNum; public Course(String cNumber,String cName ,int cUnit){ this.cNumber=cNumber; this.cName=cName; this.cU

2017-03-31 14:45:30 4111

原创 继承 矩形 正方形

矩形类 再编写一个正方形类继承矩形(注意super用法)class Retangle { public Retangle(double l,double w) {length=l; width=w;} public double calcPerimeter() {return 2*length+2*width;} public double calcArea() {retu

2017-03-31 14:42:21 3982

原创 java猜数游戏

猜数游戏:猜一个十以内的数,有五次猜的机会,每次都会提示大了或者小了import java.util.Scanner;class YouXi { public static void main(String[] args) { int b=(int)(Math.random()*10); Scanner input=new Scanner(System.in); Syst

2017-03-31 14:38:40 759

原创 Java定义一个教师类Teacher

class Teacher{ private String name; private String num; private String prof; private String dept; private String course; private int hours; public Teacher(String name,String num,String prof){

2017-03-30 19:14:54 26410

原创 编写一个程序,求1!+2!+3!+...+20!

/*class QiuHe { public static void main(String[] args) { long temp=1l; long sum=0l; for (int i=1;i<21 ;i++ ) { temp=temp*i; sum=sum+temp; } System.out.println("1!+2!+3!+...+20!=

2017-03-18 15:19:27 14006

原创 作业:用switch语句来分考试成绩的等级

用switch语句来分考试成绩的等级

2017-03-18 14:55:54 10903

空空如也

空空如也

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

TA关注的人

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