Default [Q] Switch loop problem. Help needed.

So I'm currently learning java using the book: Java A Beginners Guide by Herbert Schildt.
I cant apply my knowledge of the switch to modify this program.
What i need is that the program runs the same but i can press q to stop the program and it will continue in a loop otherwise. repeating the same process i.e displaying the characters entered until q is pressed.
How do i do it?
I think i need to make use of do and while but no idea how to apply those in this case.
Please help.


Also i would appreciate it if someone could tell me when can i start learning android application development.
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	0
Size:	76.4 KB
ID:	2870575