0

I write the code System.out.println('\577'); and it produces unclosed character literal error. What's the problem here as all the digits are in the limits of the octal integers?

user12208242
  • 315
  • 1
  • 11

1 Answers1

0

Just change it to System.out.println("/577");. You are getting error because you are using ' ' for a String but single quot (' ') can't take more that a Character, So you need to use " " (double quot) when you take into more than one character or string. Hope it works.

A S M Sayem
  • 2,010
  • 2
  • 21
  • 28