Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. package test1;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         String name = "Asš";
  7.         debug(name);
  8.     }
  9.  
  10.     public static void debug(String text) {
  11.         System.out.println(text);
  12.         byte[] bytes = text.getBytes();
  13.         for (byte b : bytes) {
  14.             int b2 = b;
  15.             if (b2 < 0) {
  16.                 b2 += 256;
  17.             }
  18.             System.out.print(b2+" ");
  19.         }
  20.         System.out.println();
  21.     }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement