We do not do your homework because the reason is- It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Further check these links this will help you to do your assignment
java program to reverse a string[
^]
Combine String example[
^]
get first & last letter of string-
public class test {
public static void main(String args[]) {
String string = args[0];
System.out.println("last character: " +string.substring((string.length() - 1));
System.out.println("first character: " +string.substring(string.charAt(0));
}
}
get integer from this
char c = string.charAt(string);
isDigit = (c >= '0' && c <= '9');
but before going through this please think yourself about the question