Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have this code that outputs ".-"

Status
Not open for further replies.

M626

Programmer
Mar 13, 2002
299
I have this code that outputs ".-" when "a" is entered but what I want to do is output "a" when ".-" is entered. Can anyone help?


for ( int i = 0; i < textLength; i++ ) {

boolean needSpace = true; // determines if a space is need between letters

switch ( Character.toLowerCase( text.charAt( i ) ) ) {
case 'a': encode = encode + &quot;.-&quot;;
break;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top