• 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

please clear my doubts

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do have SCJP exam on next week.
Now iam really getting confused with inner classes.Just clear my dounts like yes or no.
1.Is top level nested class /interface must be static.It can contain both static and non static member variables, But it access only static members of the enclosing class.
we can use any accessmodifiers fo them.
2.Local class(either static or nonstatic) cannot contain any access modifiers.
3.we cannot define any static members in Local class,Non static inner class, anonymous class.
4.Question on Unicode
a=\u0061
can i use quotes like ('\u0061') .
I know i should not use but i want to clear my doubt.
5. Treemap and Treeset are only have comparator method.
am i correct.
I want some good explanation on inner classes.
please clear my doubts.
thanks
Suni

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
1. True
2. True. Local class are declared in a method and hence no access modifier.
3.True, Non-static inner class cannot have static members.But they can have final static members.
4. All elements(Keys) inserted into an sorted set(Sortedmap) must implement the Comparable interface.
All The Best
Ashish
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suni:
Take a look at Khalid and Rasmussen's book for inner classes (or just about anything else), it's damn good.
I just passed the exam this morning....play with a lot of mocks and use each mock as a learning experience....document what areas you lost most points on on the mocks and read up on that. I know I'm not tell you something you don't already know...but still....sometimes it helps to hear it from somebody else I think!
Focus on threads....there'll probably be quite a few questions on threads. Also, focus on the basics....tons of questions on fundamental stuff.
Good luck.
Sameer
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic