r/JavaProgramming • u/FloppaXR • Aug 18 '26
I need a bit of help…
Howdy! I’m a VERYYY new programmer, and one of my assignments to learn Java is to print ASCII art of a fish, and as dumb as this sounds, I can’t figure it out for the life of me!
You see, the assignments makes it so I have directly copy the fish, and the fish they gave me uses a “\” and quotation in the same line, and exertions I attempt to print, it flags it as an “Illegal character”
Is there anyway I can work around this? Or is it truly impossible. I REALLY hope for prior but I definitely expect the latter…
2
Upvotes
1
u/DemicideMMMCCCI Aug 18 '26 edited Aug 18 '26
"\"" (notice the double quotes at the end)
I think that's what you're looking for?
2
u/jirlboss Aug 18 '26
Double backslash cancels out the escape character and will print a single backslash