Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TestSomeThings {
- public static void main(String[] args){
- String str = "Hello World!!";
- System.out.println(str);
- byte[] bites = str.getBytes();
- System.out.println(bites);
- try {
- String convertedStr = new String(bites);
- System.out.println(convertedStr);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- /************************************
- OUTPUT:
- Hello World!!
- [B@5cd622e5
- Hello World!!
- ************************************/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement