自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 文件IO流

File srcFile=new File(“F:\img”);String uploadPath=“c:\upload\”;File uploadFile=new File(uploadPath);if (!uploadFile.exists()){uploadFile.mkdir();}File[]files=srcFile.listFiles();for (File file:files){InputStream is =new FileInputStream(file);Strin

2020-07-18 18:30:32 102

原创 日历类

Calendar c = Calendar.getInstance();//通过静态方法得到 日历类对象int weekYear = c.getWeekYear();System.out.println(weekYear);Date time = c.getTime();System.out.println(time);

2020-07-18 18:29:02 173

原创 将毫秒值转成 正常日期

format = new SimpleDateFormat(“yyyy年MM月dd日”);String result = format.format(new Date(value));try {            format = new SimpleDateFormat(“yyyy年MM月dd日”);       &

2020-07-18 18:28:21 352

原创 将当前时间转成毫秒值

Date date = new Date();//        long time = date.getTime();//        System.out.println(time);

2020-07-18 18:27:01 1719

原创 日期类异常

public void testDate(){//获取当前时间System.out.println(new Date());//将当前时间的毫秒值 转为日期System.out.println(new Date(0L));}//1.将当前时间转为 正常格式        //创建 日期格式化类对象   ,HH 代表24小时制  . hh 12小时制   &nbsp

2020-07-18 18:26:39 152

原创 斗地主

Map<Integer,String> map=new HashMap<>();        List list = new ArrayList<>();        String [] color={“♠”,“♦”,“♣”,“♥”};        St

2020-07-18 18:21:55 73

原创 Comparator 使用

//Comparator 使用public class StudentCompare implements Comparator {@Overridepublic int compare(Student s1, Student s2) {int sum1=s2.getSum()-s1.getSum();int sum2=sum10?s2.getChinese()-s1.getChinese():sum1;int sum3=sum20?s2.getMaths()-s1.getMaths():su

2020-07-17 10:56:14 65

原创 从出生到现在一共有多少天

public static void main(String[] args) throws ParseException {        SimpleDateFormat s = new SimpleDateFormat(“yyyy年MM月dd日”);        long nowDate = new Date().getTime();  

2020-07-17 10:51:53 301

原创 排序

public static void main(String[] args) {        int [] a=new int[]{11,2,35,48,5,64};        int max = a[0];   //假设的值 ,是数组任意值        int mi

2020-07-17 10:50:34 78

原创 斗地主代码

斗地主代码public static void main(String[] args) { // 1. 准备牌 // 1.1 创建存储牌的集合 List<String> pakerBox = new ArrayList<String>(); // 造牌 // 1.2 创建花色,存储花色 List<String> colors = new ArrayList<String>(); colors.add("

2020-07-17 09:56:59 429

空空如也

空空如也

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

TA关注的人

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