摘要:        
public class Demo3{ public static void main(String [] args){ int num = 0; int t = 0; Scanner sc = new Scanner(System.in); System.out.println("请输入一个字符串:"); //存储键盘录入的字符串 Stri...    阅读全文
posted @ 2018-03-16 22:47
因为你,我爱上了那抹蓝
阅读(1965)
评论(0)
推荐(0)
        
            
        
        
摘要:        
public class Demo3 { //创建一个字符串,查找指定字符在字符串中出现的次数 public static void main(String[] args) { //创建一个随机字母的字符串 String str = "abababtestabergab"; int count = 0; for(int i=0;i<str.length();i++){ ...    阅读全文
posted @ 2018-03-16 22:41
因为你,我爱上了那抹蓝
阅读(1360)
评论(0)
推荐(0)
        
            
        
        
摘要:        
public class Demo { /** * 输入一个的身份证号码,并由此号码输出对应的生日,年 月 日 */ //420626199407182563 public static void main(String[] args) { for(;;){ System.out.println("请...    阅读全文
posted @ 2018-03-16 22:39
因为你,我爱上了那抹蓝
阅读(181)
评论(0)
推荐(0)
        
            
        
        
摘要:        
String 中常用的一些方法: String.length 获取字符串的长度 列: String str = "abcd"; 当我们调用str.length()方法打印输出的时候,返回的值是4 String.split();截取字符串(分割字符串) 列: String str ="abc,def,    阅读全文
posted @ 2018-03-16 22:35
因为你,我爱上了那抹蓝
阅读(154)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号