Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. public class TestSomeThings {
  2.     public static void main(String[] args){
  3.         String str = "Hello World!!";
  4.         System.out.println(str);
  5.         byte[] bites = str.getBytes();
  6.         System.out.println(bites);
  7.         try {
  8.             String convertedStr = new String(bites);
  9.             System.out.println(convertedStr);
  10.         } catch (Exception e) {
  11.             // TODO Auto-generated catch block
  12.             e.printStackTrace();
  13.         }
  14.     }
  15. }
  16.  
  17.  
  18. /************************************
  19.     OUTPUT:
  20.    
  21.    
  22. Hello World!!
  23. [B@5cd622e5
  24. Hello World!!
  25.  
  26.  
  27. ************************************/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement