摘要: package 文件操作;import java.io.*;import java.util.Arrays;public class File { public static void main(String[] args) { try { FileInputStream fin=new FileI 阅读全文
posted @ 2018-07-01 18:27 蜂蜜峰峰 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1.事件监听 package 事件监听;import java.awt.*;import java.awt.event.*; public class Frame2 extends Frame implements ActionListener{ private Button button1; pu 阅读全文
posted @ 2018-06-24 16:50 蜂蜜峰峰 阅读(306) 评论(0) 推荐(0) 编辑
摘要: package 个人信息; import java.awt.*;public class Frame1 extends Frame { public Frame1 () { super("个人信息"); this.setSize(250,200);//设计组件的尺寸 this.setLocation 阅读全文
posted @ 2018-06-04 13:05 蜂蜜峰峰 阅读(454) 评论(1) 推荐(0) 编辑
摘要: package 学生成绩;import java.util.Scanner;//import java.util.Arrays; public class Scorecore { private static Scanner sc=new Scanner(System.in); private st 阅读全文
posted @ 2018-05-28 20:12 蜂蜜峰峰 阅读(165) 评论(0) 推荐(0) 编辑
摘要: package 银行;import java.text.SimpleDateFormat;//常用日期操作工具类import java.util.Calendar;//使用默认时区和语言环境获得一个日历import java.util.Date;public class yinhang { priv 阅读全文
posted @ 2018-05-01 16:01 蜂蜜峰峰 阅读(139) 评论(1) 推荐(0) 编辑
摘要: package 圆;public class circle { private double Radius; public double getRadius(){ return Radius; }; public void setRadius(double r) { Radius= r; } pub 阅读全文
posted @ 2018-04-23 23:23 蜂蜜峰峰 阅读(191) 评论(1) 推荐(0) 编辑
摘要: package 最大公约数和最小公倍数;import java.util.Scanner; public class 最大公约数和最小公倍数 { public static void main(String[] args) { Scanner scan= new Scanner(System.in) 阅读全文
posted @ 2018-04-10 21:35 蜂蜜峰峰 阅读(175) 评论(3) 推荐(1) 编辑
摘要: package 杨辉三角; public class 杨辉三角 { public static void main(String[] args) { int [][]a=new int[10][]; int i,j; for(i=0;i<10;i++) { a[i]=new int[i+1]; fo 阅读全文
posted @ 2018-03-29 22:42 蜂蜜峰峰 阅读(150) 评论(0) 推荐(0) 编辑
摘要: package 阶乘; public class 阶乘 { public static void main(String[] args) { int Sum=1; int i; for(i=1;i<=5;i++) Sum=Sum*i; System.out.println(Sum); } } 阅读全文
posted @ 2018-03-29 22:41 蜂蜜峰峰 阅读(147) 评论(0) 推荐(0) 编辑