본문 바로가기

C.E/Java

Java substring


public class Main {

 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub

  String s="2013-12-31 15:32:49";
  String ArrSubstring;

  
  ArrSubstring=s.substring(14,16);
  System.out.println(ArrSubstring);
  
  
 }