Results 1 to 2 of 2
  1. #1
    Java Tip's Avatar
    Java Tip is offline Moderator
    Join Date
    Nov 2007
    Posts
    1,694
    Blog Entries
    430
    Rep Power
    10

    Default Reserved Keywords

    Following are reserved keywords in Java. These words cannot be used as identifiers in Java programs.

    Java Code:
    abstract
    assert
    boolean      
    break      
    byte     
    case    
    catch      
    char    
    class
    const        
    continue   
    default      
    do         
    double   
    else    
    enum       
    extends 
    final
    finally      
    float      
    for          
    goto       
    if       
    implements         
    import   
    instanceof
    int          
    interface  
    long         
    native     
    new      
    package 
    private    
    protected 
    public
    return       
    short      
    static       
    strictfp   
    super    
    switch  
    synchronized   
    this 
    throw
    throws       
    transient  
    try          
    void       
    volatile 
    while

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Here is the order how some new key-words are included.

    In 1.2
    strictfp

    In 1.4
    assert

    In 5.0
    enum

    All others are from early versions.

    And also true, false and null may you see as key-words. Actually they are literals. You can't use them as identifiers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •