java.rst
changeset 2406 ddc35b96ecc1
parent 2405 b596469f32fc
child 2407 5a04e048c3a4
equal deleted inserted replaced
2405:b596469f32fc 2406:ddc35b96ecc1
    50 
    50 
    51 Default (ie, without any access modifier):
    51 Default (ie, without any access modifier):
    52 
    52 
    53 * It means that it is visible to all within a particular package.
    53 * It means that it is visible to all within a particular package.
    54 
    54 
    55 static.
    55 ``static``:
    56 -------
       
    57 
    56 
    58 * Static means one per class, not one for each object no matter how many
    57 * Static means one per class, not one for each object no matter how many
    59   instance of a class might exist. This means that you can use them without
    58   instance of a class might exist. This means that you can use them without
    60   creating an instance of a class.
    59   creating an instance of a class.
    61 * Static methods are implicitly final, because overriding is done based on
    60 * Static methods are implicitly final, because overriding is done based on
    63   object.
    62   object.
    64 * A static method in a superclass can be shadowed by another static method in
    63 * A static method in a superclass can be shadowed by another static method in
    65   a subclass, as long as the original method was not declared final.
    64   a subclass, as long as the original method was not declared final.
    66 * You can't override a static method with a nonstatic method.
    65 * You can't override a static method with a nonstatic method.
    67 
    66 
    68 final.
    67 ``final``:
    69 ------
       
    70 
    68 
    71 * A final class can't be extended ie., final class may not be subclassed.
    69 * A final class can't be extended ie., final class may not be subclassed.
    72 * A final method can't be overridden when its class is inherited.
    70 * A final method can't be overridden when its class is inherited.
    73 * You can't change value of a final variable.
    71 * You can't change value of a final variable.
    74 
    72 
    75 Exceptions.
    73 Exceptions
    76 ===========
    74 ==========
    77 
    75 
    78 A checked exception is some subclass of Exception (or Exception itself),
    76 A checked exception is some subclass of ``Exception`` (or ``Exception`` itself),
    79 excluding class RuntimeException and its subclasses.
    77 excluding class ``RuntimeException`` and its subclasses.
    80 
    78 
    81 Unchecked exceptions are RuntimeException and any of its subclasses. Class
    79 Unchecked exceptions are ``RuntimeException`` and any of its subclasses. Class
    82 Error and its subclasses also are unchecked. With an unchecked exception,
    80 ``Error`` and its subclasses also are unchecked. With an unchecked exception,
    83 however, the compiler doesn't force client programmers either to catch the
    81 however, the compiler doesn't force client programmers either to catch the
    84 exception or declare it in a throws clause.
    82 exception or declare it in a throws clause.
    85 
    83 
    86 Inner classes.
    84 Inner classes.
    87 ==============
    85 ==============
   122 Anonymous classes.
   120 Anonymous classes.
   123 ------------------
   121 ------------------
   124 
   122 
   125 Anonymous inner classes extend local inner classes one level further. As
   123 Anonymous inner classes extend local inner classes one level further. As
   126 anonymous classes have no name, you cannot provide a constructor.
   124 anonymous classes have no name, you cannot provide a constructor.
   127 
       
   128 64-bit problem.
       
   129 ===============
       
   130 
       
   131 http://www.java.com/en/download/faq/java_win64bit.xml
       
   132   Which version of Java should I download for my 64-bit Windows
       
   133   operating system?
       
   134 http://java.sun.com/javase/6/webnotes/install/system-configurations.html
       
   135   Java SE 6 Release Notes Supported System Configurations
       
   136 
   125 
   137 Java performance.
   126 Java performance.
   138 =================
   127 =================
   139 
   128 
   140 http://java.sun.com/performance/reference/whitepapers/5.0_performance.html
   129 http://java.sun.com/performance/reference/whitepapers/5.0_performance.html