随笔分类 -  java

摘要:package com.cyjt97.dt;import java.util.Date;public class day { public static void main(String[] args) { Date dt = new Date(); Date dt2 = new Date(0L); 阅读全文 »
posted @ 2023-03-18 18:03 文采呱呱 阅读(25) 评论(0) 推荐(0) 编辑
摘要:QQ的正则表达式验证: String QQ = "[0-9]\\d{4,11}";System.out.println("123456".matches(QQ)); 手机号验证:String phone = "^(13[0-9]|14[5|7]|15[0-9]|18[0-9])\\d{8}$"; S 阅读全文 »
posted @ 2023-03-18 15:47 文采呱呱 阅读(28) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.bubbling; public class mid { public static void main(String[] args) { int arr[] = {11, 22, 33, 44, 55, 66, 77, 88, 99}; int index = 阅读全文 »
posted @ 2023-03-18 14:01 文采呱呱 阅读(11) 评论(0) 推荐(0) 编辑
摘要://冒泡排序:package com.cyjt97.bubbling;import java.util.Arrays;public class test { public static void main(String[] args) { int arr[] = {11, 33, 22, 66, 5 阅读全文 »
posted @ 2023-03-18 11:04 文采呱呱 阅读(19) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.arr; import java.lang.reflect.Array; import java.util.Arrays; public class arr { public static void main(String[] args) { int arr[] 阅读全文 »
posted @ 2023-03-17 17:36 文采呱呱 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 阅读全文 »
posted @ 2023-03-17 16:38 文采呱呱 阅读(10) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.inGer; public class InGer { public static void main(String[] args) { // 手动封箱 // 将数据类型手动包装为类 int num = 10; Integer i1 = Integer.valu 阅读全文 »
posted @ 2023-03-17 16:26 文采呱呱 阅读(15) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.BD; import java.math.BigDecimal; import java.math.RoundingMode; //BigDecimal解决小数不精准问题 public class day { public static void main(St 阅读全文 »
posted @ 2023-03-17 15:55 文采呱呱 阅读(7) 评论(0) 推荐(0) 编辑
摘要:currentTimeMillis: package com.cyjt97.SY; public class ay { public static void main(String[] args) { long start = System.currentTimeMillis(); String s 阅读全文 »
posted @ 2023-03-17 15:02 文采呱呱 阅读(31) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.M; public class mathM { public static void main(String[] args) { // abs取绝对值 System.out.println(Math.abs(-123));//123 System.out.pri 阅读全文 »
posted @ 2023-03-17 14:54 文采呱呱 阅读(27) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.eq;class StuDer{ private String name; private int age; public StuDer() { } @Override public boolean equals(Object obj) { if (obj in 阅读全文 »
posted @ 2023-03-16 16:51 文采呱呱 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 阅读全文 »
posted @ 2023-03-16 16:11 文采呱呱 阅读(11) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.Frame; import javax.swing.*; public class JFrameDEME { public static void main(String[] args) { // 创建窗体 JFrame jf = new JFrame(); / 阅读全文 »
posted @ 2023-03-15 17:56 文采呱呱 阅读(13) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.interior; public class day04 { public static void main(String[] args) { use(new cs() { @Override public void show() { System.out.pr 阅读全文 »
posted @ 2023-03-15 15:55 文采呱呱 阅读(29) 评论(0) 推荐(0) 编辑
摘要:静态类: package com.cyjt97.interior; public class day2 { public static void main(String[] args) { // 静态 Outer.Inner.show(); // Outer.Inner os = new Outer 阅读全文 »
posted @ 2023-03-13 18:16 文采呱呱 阅读(17) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.code; public class day { public static void main(String[] args) { } } class code { static int i; static { i = 0; } } 阅读全文 »
posted @ 2023-03-13 17:30 文采呱呱 阅读(12) 评论(0) 推荐(0) 编辑
摘要:jdk8 -default:为了解决接口升级问题 package com.cyjt97.Paymentsystem;public interface pay { void money(double money); // jdk8新特性 default public default void meth 阅读全文 »
posted @ 2023-03-13 09:40 文采呱呱 阅读(24) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.minterface; public class minterface { // 接口: // 接口的思想提现就是规则 // 如果一个类,所有的组成都是抽象方法, // -没有成员变量 // -没有普通方法 // 这种类我们会设计为java中的接口,因为这个类的 阅读全文 »
posted @ 2023-03-10 15:18 文采呱呱 阅读(27) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.Abstract; public class Abstract { public static void main(String[] args) { } } abstract class a{ public abstract void eat(); } clas 阅读全文 »
posted @ 2023-03-10 11:33 文采呱呱 阅读(8) 评论(0) 推荐(0) 编辑
摘要:package com.cyjt97.a; public class studer { public static void main(String[] args) { cf(); } private static void cf() { System.out.println("吃饭"); } } 阅读全文 »
posted @ 2023-03-10 11:20 文采呱呱 阅读(12) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示