Sorry about the basic question, I'm still very new to Java.
When I try to use
to print a
variable followed by a colon the colon overtypes the first letter of the
So for example I type the following command
System.out.println(planetName + ":");
...and get this as output (Lets say the planet name is Zeta Alpha II)
:eta Alpha II
What am I doing wrong? If I omit the colon then the variable prints normally. Everything else works fine, I have tried
solutions and using a
variable to no avail also.
: As JimGarrison was so kind to suggest in the comments, the input file had \r characters (i.e. it was in CRLF DOS \r\n format.), a quick run of
fixed the input data and solved the problem