Header Ads Widget

Responsive Advertisement

Ticker

6/recent/ticker-posts

Java get binary value from alphabet (Java)

You can try compile and execute java program below to get all binary value for A-Z and a-z.
*********************************************************************
COMPLETE SOURCE CODE FOR : JavaGetBinaryFromLetter.java
*********************************************************************
public class JavaGetBinaryFromLetter
{
public static void main(String[]args)
{
 String a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

 for(int i=0;i<a.length();i++)
 {
  char b=a.charAt(i);
  int temp=(int)b;
  String c=Integer.toBinaryString(temp);
  System.out.println("BINARY VALUE FOR LETTER "+b+" IS : "+c);
 }
}
}