@@ -0,0 +1,949 @@
+package com.samovich.cop2800.chapter7;%0A%0Aimport javax.swing.JOptionPane;%0A%0A/**%0A * Filename YLoop.java%0A * Created by Valery Samovich%0A * Written on 6/17/16%0A */%0Apublic class YLoop %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        // declare vars%0A        final char YES_OPTION = 'y';%0A        String entryString;%0A        char entryChar;%0A        int count = 0;%0A%0A        // prompt the user%0A        entryString = JOptionPane.showInputDialog(%0A                null,%0A                %22Do you want to see greeting?%22);%0A%0A        // assign first char%0A        entryChar = entryString.charAt(0);%0A%0A        // loop do control more greetings%0A        while(Character.toLowerCase(entryChar) == YES_OPTION)%7B%0A            ++count;%0A            entryString = JOptionPane.showInputDialog(%0A                    null,%0A                    %22Greeting #%22 + count + %22 Hello!%5CnDo you want to see another greeting?%22);%0A            entryChar = entryString.charAt(0);%0A        %7D%0A    %7D%0A%7D%0A

Add example to compare chars