• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unclosed string literal

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi one more question on char literal.

when i give

I'm getting the compiler error .. when i use

I'm getting the error.


Can someone give me the legal identifies using unicode characters???

I know that identifiers starting with $(Dollar sign),Letters(unicode characters),_(underscore) are legal.
But,I'm unable to use unicode charcters for my identifiers in my code.

Any suggestions!!! please...

Can someone explain what these unicode characters stand for.???

[ September 07, 2005: Message edited by: shanthisri mocherla ]

[ September 07, 2005: Message edited by: shanthisri mocherla ]
[ September 07, 2005: Message edited by: shanthisri mocherla ]
 
shanthisri mocherla
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys my mistake .
Forgot to write u in the unicode char literals.

Can somone give legal identifiers with uncicode characters ???
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Java compiler substitutes the real characters for the Unicode escapes before it does almost anything else. '\u000a' is the code for a newline, so the line

char c4 = '\u000a';

ends up as

char c4 = '
';

Giving you the unterminated character constant.
 
Can't .... do .... plaid .... So I did this tiny ad instead:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic