随笔分类 -  前端歌谣--学习篇-java基本语法

java基本语法
摘要://treeset排序集合 import java.util.*; public class test61{ public static void main(String[] args){ TreeSet tree=new TreeSet();//创建一个采用默认树形自然排序的对象 tree.add 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(20) 评论(0) 推荐(0) 编辑
摘要:public class Goods { //商品实体类 private String number;//商品编号 private String name;//商品价格 private double price;//商品单价 private int quantity;//商品数量 public vo 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(24) 评论(0) 推荐(0) 编辑
摘要:public class Goods { //商品实体类 private String number;//商品编号 private String name;//商品价格 private double price;//商品单价 private int quantity;//商品数量 public vo 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(22) 评论(0) 推荐(0) 编辑
摘要:import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; //员工信息类 //date类 public class test50 { private String name; priv 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(68) 评论(0) 推荐(0) 编辑
摘要:package com.zx; import java.text.DateFormat; import java.util.Date; //员工信息类 //date类 public class test50 { private String name; private String sex; pri 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(64) 评论(0) 推荐(0) 编辑
摘要:import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; //员工信息类 //date类 public class test50 { private String name; priv 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(21) 评论(0) 推荐(0) 编辑
摘要:import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; //员工信息类 //date类 public class test50 { private String name; priv 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(25) 评论(0) 推荐(0) 编辑
摘要://math import java.util.Scanner; public class test55 { public static void main(String[] args){ Scanner in=new Scanner(System.in); System.out.println(" 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(25) 评论(0) 推荐(0) 编辑
摘要:import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; //员工信息类 //date类 public class test50 { private String name; priv 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(139) 评论(0) 推荐(0) 编辑
摘要:import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class test53 { public static void main(String[] args){ //获 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(19) 评论(0) 推荐(0) 编辑
摘要:package com.zx; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; //员工信息类 //date类 public class test50 { private S 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(18) 评论(0) 推荐(0) 编辑
摘要:import java.util.Date; import java.util.Scanner; public class test51 { public static void main(String[] args){ Scanner in=new Scanner(System.in); Syst 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(24) 评论(0) 推荐(0) 编辑
摘要:String、StringBuffer和StringBuilder区别 1、长度是否可变 String 是被 final 修饰的,他的长度是不可变的,就算调用 String 的concat 方法,那也是把字符串拼接起来并重新创建一个对象,把拼接后的 String 的值赋给新创建的对象 StringB 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(28) 评论(0) 推荐(0) 编辑
摘要:public class test48 { //连接字符串 public static String concatString(String base,String[] str){ StringBuilder builder=new StringBuilder(base);//构建可变字符串 for 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(37) 评论(0) 推荐(0) 编辑
摘要://stringbuilder public class test47 { public static void main(String[] args){ StringBuilder builder=new StringBuilder("我是一个热血的少年"); System.out.println 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(23) 评论(0) 推荐(0) 编辑
摘要:public class test45 { //将给定的字符串返回成一个数组 public static char[] toArrayFromString(String target){ return target.toCharArray(); } //大小写转换根据所给的第二个参数取决于大小写转换 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(131) 评论(0) 推荐(0) 编辑
摘要:public class test44 { //分割字符串数组 public static String[] spitString(String resource,String tag){ return resource.split(tag); } } 测试 public class test43 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(36) 评论(0) 推荐(0) 编辑
摘要://String方法 public class test41 { //比较两个人的姓名是否相同 public static boolean eqName(String name1,String name2){ return name2.equals(name1)?true:false; } //按照 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(62) 评论(0) 推荐(0) 编辑
摘要://字符串概述 public class test40 { public static void main(String[] args){ char[] str1={'1','2','3','4','5','6','7','8','9'}; String str2=new String("我是歌谣" 阅读全文
posted @ 2022-06-25 15:26 前端导师歌谣 阅读(18) 评论(0) 推荐(0) 编辑
摘要:/1 使用Eclipse编写控制台应用程, 使用while循环在控制台打印10行10列的如下图形 □ □ □ □ □ □ □ □ □ □ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ □ □ □ □ □ □ □ □ □ □ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ □ □ □ □ □ □ □ □ □ □ ■ 阅读全文
posted @ 2022-06-22 22:55 前端导师歌谣 阅读(19) 评论(0) 推荐(0) 编辑

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