Create a program that allows you to display lowercase letters a to A or a to A using the ASCII character code.
public class Alphabet{ public static void main(String args[]) char a = 'a'; int y = 0; int z = 0; y = (char)a; z = y & Oxdf; // Find the bitwise AND System.out.println((char)z); //Aが表示される
a='a’;
y=0;
z=0;
y=(char)a;
z = y | 0x20; // Find the bitwise OR System.out.println ((char) z); // a is displayed.
Recommended Posts