@@ -0,0 +1,1477 @@
+import java.util.Scanner;%0Apublic class MonoAlphaCipher %7B%0A    public static char p%5B%5D = %7B'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',%0A        'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',%0A        'w', 'x', 'y', 'z'%7D;%0A    public static char ch%5B%5D = %7B'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O',%0A        'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 'X', 'C',%0A        'V', 'B', 'N', 'M'%7D;%0A    public static String doEncryption(String s) %7B%0A        char c%5B%5D = new char%5B(s.length())%5D;%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A            for (int j = 0; j %3C 26; j++) %7B%0A                if (p%5Bj%5D == s.charAt(i)) %7B%0A                    c%5Bi%5D = ch%5Bj%5D;%0A                    break;%0A                %7D%0A            %7D%0A        %7D%0A        return (new String(c));%0A    %7D%0A    public static String doDecryption(String s) %7B%0A        char p1%5B%5D = new char%5B(s.length())%5D;%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A            for (int j = 0; j %3C 26; j++) %7B%0A                if (ch%5Bj%5D == s.charAt(i)) %7B%0A                    p1%5Bi%5D = p%5Bj%5D;%0A                    break;%0A                %7D%0A            %7D%0A        %7D%0A        return (new String(p1));%0A    %7D%0A    public static void main(String args%5B%5D) %7B%0A        Scanner sc = new Scanner(System.in);%0A        System.out.print(%22Enter message: %22);%0A        String en = doEncryption(sc.next().toLowerCase());%0A        System.out.println(%22Encrypted message: %22 + en);%0A        System.out.println(%22Decrypted message: %22 + doDecryption(en));%0A    %7D%0A%7D%0A

Add Mono-alphabetic Cipher