title: String to binary output in Java
body: <p>I want to get binary (011001..) from a String but instead i get [B@addbf1 , there must be an easy transformation to do this but I don't see it.</p>
  
  <pre><code>public static String toBin(String info){
    byte[] infoBin = null;
    try {
     infoBin = info.getBytes( "UTF-8" );
     System.out.println("infoBin: "+infoBin);
    }
    catch (Exception e){
     System.out.println(e.toString());
    }
    return infoBin.toString();
  }
  </code></pre>
  
  <p>Here i get infoBin: [B@addbf1<br>
  and I would like infoBin: 01001...</p>
  
  <p>Any help would be appreciated, thanks!</p>