Advertisement
m4tx

Inverter

Mar 29th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. class Inverter {
  2.     public static void main(String args[]) {
  3.         StringBuilder build = new StringBuilder();
  4.         for (String a : args) {
  5.             build.append(" ");
  6.             build.append(a);
  7.         }
  8.         String arg = build.toString();
  9.        
  10.         StringBuilder build2 = new StringBuilder();
  11.         for (int i = arg.length()-1; i >= 0; i--) {
  12.             build2.append(arg.charAt(i));
  13.         }
  14.        
  15.         System.out.println(build2.toString());
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement