SCJP Essential Knowledge #Java Short Notes #SCJP

    • int x=5; String y=”3″; System.out.print(x + 1 + y); Output: 63
    • When there is no live reference to an object, the object becomes eligible for garbage collection.
    • The concrete interface method implementation must be public.
    • When a class implements Comparator, it must implement a compare method.
    • When a class implements Comparable, it must implement a compareTo method.
    • The Arrays.asList() method creates a fixed-size list
    • A method like void go(Set a) can be called with objects created as: TreeSet t = new TreeSet(); TreeSet t = new TreeSet();. Remember, TreeSet t = new TreeSet(); TreeSet t = new TreeSet(); will not work where Dog is a sub-class of Animal.
    • When two enums are equal, both .equals and == always return true.
    • TreeSet is ordered in their natural order or according to the Comparator provided at creation.
    • SortedMaps are abstract
    • Is-a relationships can use inheritance
    • Tightly encapsulated classes can have a has-a relationship
    • is-a or has-a relationships does not apply to methods
    • java command in details:
      Usage: java [-options] class [args...]           (to execute a class)   or  java [-options] -jar jarfile [args...]           (to execute a jar file)where options include:    -client	  to select the "client" VM    -server	  to select the "server" VM    -hotspot	  is a synonym for the "client" VM  [deprecated]                  The default VM is client.                      -cp     -classpath                   A ; separated list of directories, JAR archives,                  and ZIP archives to search for class files.    -D=                  set a system property    -verbose[:class|gc|jni]                  enable verbose output    -version      print product version and exit    -version:                  require the specified version to run    -showversion  print product version and continue    -jre-restrict-search | -jre-no-restrict-search                  include/exclude user private JREs in the version search    -? -help      print this help message    -X            print help on non-standard options    -ea[:...|:]    -enableassertions[:...|:]                  enable assertions    -da[:...|:]    -disableassertions[:...|:]                  disable assertions    -esa | -enablesystemassertions                  enable system assertions    -dsa | -disablesystemassertions                  disable system assertions    -agentlib:[=]                  load native agent library , e.g. -agentlib:hprof                    see also, -agentlib:jdwp=help and -agentlib:hprof=help    -agentpath:[=]                  load native agent library by full pathname    -javaagent:[=]                  load Java programming language agent, see java.lang.instrument

From: http://sitestree.com/?p=4893
Categories:Java Short Notes, SCJP
Tags:
Post Data:2008-03-02 15:26:47

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada