Posts

Showing posts from April, 2017

Outputs a character and its integer equivalent in Java

Image
In this Java program, the application will determine the character values of A, B, C, a, b, c, 0, 1, 2, $, *, +, /,  , to it's integer corresponding values. This is the same solution of  Deitel & Deitel   exercise  2.32 in Chapter 2. 2.32  Write an application that displays the integer equivalents of some uppercase letters, lowercase letters,digits and special symbols.At a minimum, display the integer equivalents of the following A, B, C, a, b, c, 0, 1, 2, $, *, +, /,  and blank character. import javax.swing.*; public class CharacterandInteger { public static void main(String args[]){ //Displays the outputs JOptionPane.showMessageDialog(null, "The character value of " + 'A' + " has the value of " + (int) 'A' + "\n" + "The Character value of " + 'B' + " has the value of " + (int) 'B' + "\n" + "The character value of " +'C' + " has the value of ...