Professional Documents
Culture Documents
Binary
Binary
*/ package javaapplication4; import java.io.*; /** * * @author iis */ public class JavaApplication4 { /** * @param args the command line arguments */ public static void main(String[] args) throws UnsupportedEncodingException { // TODO code application logic here String s="vivek"; char[] bin ; int a=7; byte[] b=s.getBytes(); byte b1=(byte)a; try{ for(int i=0;i<s.length();i++) { a=b[i]; System.out.println(Integer.toBinaryString(a)); } } catch(Exception e) { } }