The word error is from the catch. I think the reason the word error appears ...
Shen anigans wrote:I tried assigning x to the switch statement but it just gives me error. Is there any way to use br.readline w/o the try and catch?
Jay Watson wrote:I got the program running.It works fine, But is there any other way other than switch statement?
One other thing. You can replace your whole switch statement with one line of code. Notice that when 'y' is 1, you print out the value of morse, when 'y' is 2, you print out the value of morse, etc. Can you see a pattern ?
Ulf Dittmer wrote:There may other problems, but instead of "sentence.charAt(0)" you should have "sentence.charAt(i)".
Jay Watson wrote:Why won't it read space?
Only when there was no risk of it being used as cheating for the assignment. I am sure you had it worked out, didn't you
salvin francis wrote:you finally said it