Lev1

导航

2019年8月4日 #

复制图片

摘要: package cn.home; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; public class CopyPictur... 阅读全文

posted @ 2019-08-04 12:23 Lev1 阅读(216) 评论(0) 推荐(0) 编辑

替换文本文件内容

摘要: package cn.home; import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.FileInputStream;import java.io.FileNotFoundException;impor 阅读全文

posted @ 2019-08-04 11:56 Lev1 阅读(346) 评论(0) 推荐(0) 编辑

文件创建、查看、删除

摘要: package cn.io; import java.io.File; import java.io.IOException; //文件操作类:创建文件、查看文件信息、删除文件 public class Demo2 { //创建文件 public void create (File file) { if(!file.exists()) { ... 阅读全文

posted @ 2019-08-04 11:09 Lev1 阅读(199) 评论(0) 推荐(0) 编辑

2019年7月31日 #

注册登录,基本操作满足,部分知识还需补习

摘要: package cn.limitinglogin; //会员类 public class Users { private String name; private String password; public Users() {} public Users(String name, String password) { ... 阅读全文

posted @ 2019-07-31 17:33 Lev1 阅读(231) 评论(0) 推荐(0) 编辑

随机生成20个手机号,待完善

摘要: 1 package com.homework; 2 3 import java.util.HashSet; 4 import java.util.Set; 5 6 public class RandomPhone { 7 //初始化手机前三位 8 static String[] First = {"139","138","137","136","135",... 阅读全文

posted @ 2019-07-31 12:08 Lev1 阅读(140) 评论(0) 推荐(0) 编辑

枚举练习

摘要: package cn.meiju; public enum Learn { L1,L2,L3 } package cn.meiju; public class Worker { public void choose(Learn learn) { switch(learn) { case L1: ... 阅读全文

posted @ 2019-07-31 10:36 Lev1 阅读(137) 评论(0) 推荐(0) 编辑

2019年7月29日 #

随机生成6位的字符串验证码,要求包含数字、大小写字母

摘要: 老师讲的方法 网上找的方法 阅读全文

posted @ 2019-07-29 22:51 Lev1 阅读(1003) 评论(0) 推荐(0) 编辑

查找学员

摘要: package cn.home; public class Student { private String name; private String gender; public Student() {} public Student(String name, String gender) { su... 阅读全文

posted @ 2019-07-29 08:51 Lev1 阅读(176) 评论(0) 推荐(0) 编辑

2019年7月25日 #

hasNextInt 需要搭配scanner.next()的搭配使用

摘要: hasNextInt使用来判断输入的是否为整型 是的话为true ,不是为false 需要搭配scanner.next()的搭配使用,不使用则会进入死循环中 阅读全文

posted @ 2019-07-25 11:43 Lev1 阅读(333) 评论(0) 推荐(0) 编辑

2019年7月23日 #

抛出异常

摘要: package cn.yichang; public class NameAge { private String name; private int age; public String getName() { return name; } public void setName(St... 阅读全文

posted @ 2019-07-23 20:30 Lev1 阅读(115) 评论(0) 推荐(0) 编辑