SHARE
TWEET

Untitled

a guest Jan 24th, 2020 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static boolean isPalindrom(int[] zahlen) {
  2.         int[] zahlenBack = new int[zahlen.length];
  3.         int j = 0;
  4.         for(int i = zahlen.length - 1; i > -1; i--) {
  5.             zahlenBack[j] = zahlen[i];
  6.             j++;
  7.         }
  8.         boolean same = false;
  9.        
  10.         for(int i = 0; i < zahlen.length; i++) {
  11.             same = zahlen[i] == zahlenBack[i];
  12.         }
  13.        
  14.         return same;
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top