All Possible Combinations of Features and Modifiers : Access Modifiers « Modifiers « SCJP

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Modifiers » Access Modifiers 
3.1.4.All Possible Combinations of Features and Modifiers
Modifier         Class              Variable            Method       Constructor       

public           yes                yes                 yes          yes               

protected        no                 yes                 yes          yes
  
default(empty)   yes                yes                 yes          yes
  
private          no                 yes                 yes          yes
  
final            yes                yes                 yes          no
  
abstract         yes                no                  yes          no
  
static           no                 yes                 yes          no
  
native           no                 no                  yes          no
  
transient        no                 yes                 no           no
  
volatile         no                 yes                 no           no
  
synchronized     no                 no                  yes          no
3.1.Access Modifiers
3.1.1.Three access modifiers: public, protected, and private. Four access levels: public, protected, default, and private.
3.1.2.You can have at most one access modifier.
3.1.3.Can access modifiers be applied to local variables? NO!
3.1.4.All Possible Combinations of Features and Modifiers
3.1.5.Determining Access to Class Members
3.1.6.The order in which modifiers appear in a declaration is not important.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.