• 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

unexpected output

 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi everyone,
this present problem had caused a lot of confusion during my
preparation for SCJP exam and thought it would be useful to other
aspirants of SCJP exam.

consider the code,

1. class A1{
2. // char a = '\u00e';
3. // char b = '\u000a';
4. }

5. class A2{
6. /* char b = '\u00e'; */
7. /* char c = '\u000a'; */
8. }

can anyone explain why the following points about the above given code is
true.

--> line 2 causes compiler error
--> line 3 causes compiler error
--> line 6 causes compiler error
--> line 7 compiles and runs fine
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has been discussed before. The link is this one

(Edited by Barry Gaunt)
[ October 24, 2004: Message edited by: Barry Gaunt ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic