String的处理

 String a = "c8bd2f802c46dbfbbc3e1e17.jpg";
  byte[] a1 = a.getBytes();
  System.out.println("输入出的byte:" + a1);
  for (int i = 0; i < a1.length; i++) {
   System.out.print(a1[i] + ",");
   
  }
  System.out.println("\n反编译a =:" + new String(a1));
  
  String tt="lh.eachtravel.com,kjy.eachtravel.com,hl.eachtravel.com,";
  String url []=tt.split(",");
  for(String ab:url){
    System.out.println(ab);
  }
       String b="lh.eachtravel.com";
       String c="hhh.eachtravel.com";
       System.out.println(tt.indexOf(b));
       System.out.println(tt.indexOf(c));

你可能感兴趣的:(String的处理)