No, the loop is implemented in in that Translate class. I'd change the logic though. In your Translate class you could read the file in a static initializer block and provide a static method :
...
Type: Posts; User: PhHein
No, the loop is implemented in in that Translate class. I'd change the logic though. In your Translate class you could read the file in a static initializer block and provide a static method :
...
The original is sentence and the morse is morse.getSentence() .I have no idea what that for loop is good for and why you need char[] c.
You still haven't posted, what the expected output is. And why do you read the file without ever using anything from it?
You seem to use other code than that you've posted. What happened to the file reading, which is more than buggy?
There's no need to test. No Scanner instance is out of scope. Both are defined in the main method outside of other code blocks. That's why your answer is wrong.
Wrong!
The OP didn't state what his actual problem is. He's wildly mixing Strings and chars, file and input all over the place.
What is strange? Do you get Greek characters? Help us help you by posting what you get and what you expect.