摘要:
public class TimeTwo { public static void main(String[] args) throws ParseException{ String s = "2018-08-12 12:02:23"; SimpleDateFormat g = new Simple 阅读全文
摘要:
public class TimeTwo { public static void main(String[] args) throws ParseException{ String s = "2018-08-12 12:02:23"; //使用SimpleDateFormat实现字符串和日期的相互 阅读全文
摘要:
public class TimeThree { public static void main(String[] args) { SimpleDateFormat d = new SimpleDateFormat("yyyy-MM-dd E HH:mm:ss"); Date date = new 阅读全文
摘要:
public class TimeFour { public static void main(String[] args) throws ParseException{ TimeFour four = new TimeFour(); four.test(); } public void test( 阅读全文
摘要:
public class Time { public static void main(String[] args) { Date t = new Date(); DateFormat ti = new SimpleDateFormat("yyyy年MM月dd日 hh:mm:ss"); String 阅读全文
摘要:
public class A { public static void main(String[] args) { //定义的字符串 String s = "Hello World";// 通过length方法获取字符串长度 for (int i = 0;i < s.length();i++){ / 阅读全文
摘要:
public class Test { //要进行截取操作的字符串 static String ss; //截取的字符串的字节数 static int n; public static void main(String[] args) { System.out.println("请输入字符串:"); 阅读全文
摘要:
public class Da { public static void main(String[] args) { String s = "hello_*java_*world"; System.out.println("转化前:"+s); String[] strs = s.split("_\\ 阅读全文
摘要:
public class Regex1 { public static void main(String[] args) { String s = "神秘的海洋出现了一只#话题#海怪阿拉斯加#热门话题#和一艘很诡异的破船\n"; System.out.println("例子:"+s); Patter 阅读全文
摘要:
public class PaiXu1 { public static void main(String[] args) { int[] s = {345,879,456,870,221,902,148,234,478}; System.out.println("排序之前:"); System.ou 阅读全文
摘要:
public class Nine { public static void main(String[] args) { //外层循环控制行数 for (int i = 9;i >=1;i--){ //内层循环控制列 j<=I for (int j = 9; j >= i;j--){ System. 阅读全文
摘要:
public class Money{ public static void main(String[] args) { String a = "Hello Java World\n"+ "Hello Java Hello World"; System.out.println(a.replace(" 阅读全文
摘要:
public class F { public static void main(String[] args) { /**截取字符串,第4位以后的字符串用*代替*/ String s = "Hello Java World"; System.out.println("直接输出:" + s); Str 阅读全文
摘要:
public class FanZhuan { public static void main(String[] args) { String s = "987654321088123about我是谁"; System.out.println("直接输出:" + s); String str = S 阅读全文
摘要:
public class FanZhuan { public static void main(String[] args) { /**第一种方法*/ String s = "987654321088123about我是谁"; System.out.println("直接输出:"+s); Strin 阅读全文
摘要:
public class D { public static void main(String[] args) { System.out.println("请输入数字(最大十位数):"); Scanner sc = new Scanner(System.in); int sun = sc.nextI 阅读全文
摘要:
父类:public class Subjects { public void b() { System.out.println("学科"); } public void a(){ System.out.println("这是继承父类的方法:Subjects"); } public void c() 阅读全文
摘要:
public class StringToKenizer { public static void main(String[] args) { String strin = "Hello Java World!!的"; System.out.println("原字符串:" + strin + "\n 阅读全文
摘要:
public class DaXie { public static void main(String[] args) { String strin = "Hello Java World!!的"; String a[] = GetWorld1(strin); for (int i = 0;i < 阅读全文
摘要:
public class DaXie { public static void main(String[] args) { /**将所有的字符串转换成大写或小写字母并打印出来*/ String str = new String("Hello Java World"); System.out.prin 阅读全文