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());


Popular posts from this blog

Custom Dialog with no title and full screen in Android

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

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