The following declarations are illegal for default modifier : default modifier « 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 » default modifier 
3.3.2.The following declarations are illegal for default modifier
// default isn't a keyword

public class MainClass{
    default void main(){ //Error
        System.out.println();
    }
}
3.3.default modifier
3.3.1.The default access mode (no modifier)
3.3.2.The following declarations are illegal for default modifier
3.3.3.Default is the name for empty modifier.
3.3.4.Default modifier for method
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.