Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1.     private Map<byte[], String> foo(String v1, String v2) {
  2.         if (v1.length() == v2.length()) {
  3.             Map<byte[], String> map = new HashMap<>();
  4.             byte[] key = v1.getBytes();
  5.             map.put(key, v1);
  6.             System.arraycopy(v2.getBytes(), 0, key, 0, v2.length());
  7.             map.put(key, v2);
  8.             return map;
  9.         }
  10.         return null;
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement