摘要:
public class TimeTwo { public static void main(String[] args) throws ParseException{ String s = "2018-08-12 12:02:23"; SimpleDateFormat g = new Simple 阅读全文
posted @ 2018-05-31 17:14
背起全世界の蜗牛
阅读(439)
评论(0)
推荐(0)
摘要:
public class TimeTwo { public static void main(String[] args) throws ParseException{ String s = "2018-08-12 12:02:23"; //使用SimpleDateFormat实现字符串和日期的相互 阅读全文
posted @ 2018-05-31 17:10
背起全世界の蜗牛
阅读(1924)
评论(0)
推荐(0)
摘要:
public class TimeThree { public static void main(String[] args) { SimpleDateFormat d = new SimpleDateFormat("yyyy-MM-dd E HH:mm:ss"); Date date = new 阅读全文
posted @ 2018-05-31 17:08
背起全世界の蜗牛
阅读(2596)
评论(0)
推荐(0)
摘要:
public class TimeFour { public static void main(String[] args) throws ParseException{ TimeFour four = new TimeFour(); four.test(); } public void test( 阅读全文
posted @ 2018-05-31 17:07
背起全世界の蜗牛
阅读(2948)
评论(0)
推荐(0)
摘要:
public class Time { public static void main(String[] args) { Date t = new Date(); DateFormat ti = new SimpleDateFormat("yyyy年MM月dd日 hh:mm:ss"); String 阅读全文
posted @ 2018-05-31 17:00
背起全世界の蜗牛
阅读(1033)
评论(0)
推荐(0)
摘要:
public class A { public static void main(String[] args) { //定义的字符串 String s = "Hello World";// 通过length方法获取字符串长度 for (int i = 0;i < s.length();i++){ / 阅读全文
posted @ 2018-05-31 16:58
背起全世界の蜗牛
阅读(50397)
评论(0)
推荐(0)
摘要:
public class Test { //要进行截取操作的字符串 static String ss; //截取的字符串的字节数 static int n; public static void main(String[] args) { System.out.println("请输入字符串:"); 阅读全文
posted @ 2018-05-31 16:47
背起全世界の蜗牛
阅读(1062)
评论(0)
推荐(0)
摘要:
public class Da { public static void main(String[] args) { String s = "hello_*java_*world"; System.out.println("转化前:"+s); String[] strs = s.split("_\\ 阅读全文
posted @ 2018-05-31 15:48
背起全世界の蜗牛
阅读(2242)
评论(0)
推荐(0)
摘要:
public class Regex1 { public static void main(String[] args) { String s = "神秘的海洋出现了一只#话题#海怪阿拉斯加#热门话题#和一艘很诡异的破船\n"; System.out.println("例子:"+s); Patter 阅读全文
posted @ 2018-05-31 15:36
背起全世界の蜗牛
阅读(1635)
评论(0)
推荐(0)
摘要:
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 阅读全文
posted @ 2018-05-31 15:25
背起全世界の蜗牛
阅读(697)
评论(0)
推荐(0)
摘要:
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. 阅读全文
posted @ 2018-05-31 15:15
背起全世界の蜗牛
阅读(212)
评论(0)
推荐(0)
摘要:
public class Money{ public static void main(String[] args) { String a = "Hello Java World\n"+ "Hello Java Hello World"; System.out.println(a.replace(" 阅读全文
posted @ 2018-05-31 15:09
背起全世界の蜗牛
阅读(248)
评论(0)
推荐(0)
摘要:
public class F { public static void main(String[] args) { /**截取字符串,第4位以后的字符串用*代替*/ String s = "Hello Java World"; System.out.println("直接输出:" + s); Str 阅读全文
posted @ 2018-05-31 15:05
背起全世界の蜗牛
阅读(9227)
评论(0)
推荐(1)
摘要:
public class FanZhuan { public static void main(String[] args) { String s = "987654321088123about我是谁"; System.out.println("直接输出:" + s); String str = S 阅读全文
posted @ 2018-05-31 15:01
背起全世界の蜗牛
阅读(306)
评论(0)
推荐(0)
摘要:
public class FanZhuan { public static void main(String[] args) { /**第一种方法*/ String s = "987654321088123about我是谁"; System.out.println("直接输出:"+s); Strin 阅读全文
posted @ 2018-05-31 14:56
背起全世界の蜗牛
阅读(4046)
评论(0)
推荐(0)
摘要:
public class D { public static void main(String[] args) { System.out.println("请输入数字(最大十位数):"); Scanner sc = new Scanner(System.in); int sun = sc.nextI 阅读全文
posted @ 2018-05-31 14:49
背起全世界の蜗牛
阅读(629)
评论(0)
推荐(0)
摘要:
父类:public class Subjects { public void b() { System.out.println("学科"); } public void a(){ System.out.println("这是继承父类的方法:Subjects"); } public void c() 阅读全文
posted @ 2018-05-31 14:43
背起全世界の蜗牛
阅读(8846)
评论(0)
推荐(0)
摘要:
public class StringToKenizer { public static void main(String[] args) { String strin = "Hello Java World!!的"; System.out.println("原字符串:" + strin + "\n 阅读全文
posted @ 2018-05-31 14:29
背起全世界の蜗牛
阅读(899)
评论(0)
推荐(0)
摘要:
public class DaXie { public static void main(String[] args) { String strin = "Hello Java World!!的"; String a[] = GetWorld1(strin); for (int i = 0;i < 阅读全文
posted @ 2018-05-31 14:21
背起全世界の蜗牛
阅读(1775)
评论(0)
推荐(0)
摘要:
public class DaXie { public static void main(String[] args) { /**将所有的字符串转换成大写或小写字母并打印出来*/ String str = new String("Hello Java World"); System.out.prin 阅读全文
posted @ 2018-05-31 11:18
背起全世界の蜗牛
阅读(57291)
评论(0)
推荐(1)
摘要:
public class D { public static void main(String[] args) { String b = "Hello Java World"; System.out.println("原字符串:"+b); /*把字符串转化为数组形式,并用正则表达式进行分割*/ St 阅读全文
posted @ 2018-05-31 11:10
背起全世界の蜗牛
阅读(14927)
评论(0)
推荐(1)
摘要:
public class Countdown4 { private static long day = 0; private static long hour = 0; private static long minute = 0; private static long second = 0; p 阅读全文
posted @ 2018-05-31 10:39
背起全世界の蜗牛
阅读(4740)
评论(0)
推荐(0)
摘要:
public class Countdown3 { private int lin; private int curSec; public Countdown3(int lin)throws InterruptedException{ this.lin = lin; this.curSec = li 阅读全文
posted @ 2018-05-31 10:35
背起全世界の蜗牛
阅读(1442)
评论(0)
推荐(0)
摘要:
public class Countdown2 { private volatile int lin; private int curSec; public Countdown2(int lin) throws InterruptedException{ /*记录倒计时时间*/ this.lin = 阅读全文
posted @ 2018-05-31 10:02
背起全世界の蜗牛
阅读(524)
评论(0)
推荐(0)
摘要:
public class Countdown { private int lin; public Countdown(int lin)throws InterruptedException{ this.lin = lin; System.out.println("最后倒数时刻:" + lin + " 阅读全文
posted @ 2018-05-31 09:47
背起全世界の蜗牛
阅读(1038)
评论(0)
推荐(0)
摘要:
public class Sort2 { public static void main(String[] args) { Sort2 sort = new Sort2(); System.out.println("各种排序的代码"); System.out.print("没排序前的数据 "); i 阅读全文
posted @ 2018-05-31 09:40
背起全世界の蜗牛
阅读(544)
评论(0)
推荐(0)
摘要:
public class Sort { public static void arrangeSequence(char[] strArr,int i){ char temp; ArrayList<String> list = new ArrayList<>(); if(strArr == null 阅读全文
posted @ 2018-05-31 09:38
背起全世界の蜗牛
阅读(2421)
评论(0)
推荐(0)
摘要:
public class List { public static void main(String[] args) { String s = "abc nnn ooo/xzsxc bs"; System.out.println("原字符串:"+s); System.out.println(); S 阅读全文
posted @ 2018-05-31 09:33
背起全世界の蜗牛
阅读(1056)
评论(0)
推荐(0)
摘要:
public class List1 { public static void main(String[] args) { String s = "abc nnn ooo/xzsxc bs"; System.out.println("原字符串:"+ s + "\n"); //把s字符串变成ss数组, 阅读全文
posted @ 2018-05-31 09:27
背起全世界の蜗牛
阅读(5297)
评论(0)
推荐(0)
摘要:
public class ABC { public static void main(String[] args) { new ABC().sortStringArray(); } public void sortStringArray(){ String[] a = new String[]{"O 阅读全文
posted @ 2018-05-31 09:17
背起全世界の蜗牛
阅读(3338)
评论(0)
推荐(0)
摘要:
public class ABD { public static void main(String[] args) { //Collator类是用来执行区分语言环境的String比较的,这里是选择CHINA Comparator comparator = Collator.getInstance(L 阅读全文
posted @ 2018-05-31 09:07
背起全世界の蜗牛
阅读(5933)
评论(0)
推荐(0)

浙公网安备 33010602011771号