Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Lesson_29_Activity_Two {
- public static String [] list = {"every", "nearing", "checking", "food", "stand", "value"};
- public static void main(String[] args) {
- String [] newlist = new String[list.length];
- String rev = "";
- for(int j = 0; j < list.length; j++) {
- for(int i = list[j].length()-1; i >= 0; i--) {
- rev = rev + list[j].charAt(i);
- }
- newlist[j] = rev;
- rev = "";
- }
- for(int x = 0; x < newlist.length; x++) {
- System.out.println(newlist[x]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement