code to get last 4-chars of a String,in Android

String str="1-1-2012";
        //int length=str.length();
        str=str.substring((str.length())-4, str.length());
        System.out.println("-----------str------"+str);

Comments

Popular posts from this blog

Custom Dialog with no title and full screen in Android

code to display .pdf,.text,.DOC,.DOCX,.doc extension files exists in SDCard

Best working code to set Date limits on Date Picker Dialog,in Android