• 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

A very new to java question

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven;t done any java programming for a while now and i've forgotton a lot of stuff. I've never really understood when to use public, private, final, static etc... Can someone please explain to me in basic terms when i should use these and why

Thanks for any help

public final
public static final
public static
private static
public synchronized

Any othere I should know about? I've tried googling but can't find anything that explains why i shoud/should not use the above in detail
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My first result of googling "Java modifiers" gave me this.

For why should you use something like this? Check here to learn about objects and I'm sure you will get the answers.
You could start with Bruce Eckel's "Thinking in Java" which is an excellent free book for Java starters that introduces you to object oriented design and programming.

Cheers,
Tamas
 
reply
    Bookmark Topic Watch Topic
  • New Topic