This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes A very new to java question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "A very new to java question" Watch "A very new to java question" New topic
Author

A very new to java question

dale conn
Ranch Hand

Joined: Jun 16, 2006
Posts: 57
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
Tamas Jano
Ranch Hand

Joined: Feb 21, 2007
Posts: 55
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A very new to java question
 
Similar Threads
Access Specifiers vs Access Modifiers
ATOM Feed Parsing - Rome CopyFrom Issue
ATOM Feed Parsing - Rome CopyFrom Issue
Using reflection for button listeners, throwing ClassNotFound exception
No Such Algorithm Exception