上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: public class huiwen { public static void main(String[] args) { String str = "abcba"; String b = new StringBuffer(str).reverse().toString(); if(str.equals(b)){ ... 阅读全文
posted @ 2017-05-02 21:02 苏轼的红烧肉 阅读(112) 评论(0) 推荐(0)
摘要: import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class zhengze { public static void main(String[] args) { //1.创建一个正则表达式对象 Pattern p=Pattern.c... 阅读全文
posted @ 2017-05-02 20:38 苏轼的红烧肉 阅读(121) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class zhengze { public static void main(String[] args) { String p="[a-zA-Z]+(?=.*[0-9].*)(?=.*[_].*)\\w{7,10}"; Scanner s=new Scanner(... 阅读全文
posted @ 2017-05-02 20:18 苏轼的红烧肉 阅读(1369) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class zhengze { public static void main(String[] args) { Scanner s=new Scanner(System.in); System.out.println("请输入一个合法的用户名"); String str=s.next(... 阅读全文
posted @ 2017-05-02 19:12 苏轼的红烧肉 阅读(139) 评论(0) 推荐(0)
摘要: public class youyi { public static void main(String[] args) { System.out.println(StringAt("APP", "abcd apple")); } public static int StringAt(String s,String sub){ String a=s.toLowerCase();... 阅读全文
posted @ 2017-04-26 16:57 苏轼的红烧肉 阅读(218) 评论(0) 推荐(0)
摘要: public class youyi { public static void main(String[] args) { moveToRight("abcd",3); } public static void moveToRight(String s,int p){ System.out.print(s.substring(s.length()-p... 阅读全文
posted @ 2017-04-26 16:28 苏轼的红烧肉 阅读(154) 评论(0) 推荐(0)
摘要: public class Person { String name; int age; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void... 阅读全文
posted @ 2017-04-26 15:41 苏轼的红烧肉 阅读(102) 评论(0) 推荐(0)
摘要: import javax.management.RuntimeErrorException; public class Test11 { public static void main(String[] args) { //1.有一身份证号,判断此为男还是女,基于此方法,写一个算法,判断一个身份证号为男还是女。 ////2.求出字符串中有多少种字符,以及每个字符的个数 // stati... 阅读全文
posted @ 2017-04-26 14:39 苏轼的红烧肉 阅读(315) 评论(0) 推荐(0)
摘要: package lei; public class Test2 { public static void main(String[] args) { String s="我爱你"; StringBuffer s1 = new StringBuffer("我爱你"); String s2=new String(s1.reverse()); Syste... 阅读全文
posted @ 2017-04-25 19:12 苏轼的红烧肉 阅读(112) 评论(0) 推荐(0)
摘要: package lei; public class TestStringpool { public static void main(String[] args) { String s="java"; String s1="java"; //是否相等 if(s==s1){ System.out.println("是同一个对象"); ... 阅读全文
posted @ 2017-04-25 15:24 苏轼的红烧肉 阅读(165) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页