Dec 07

SCJP: Random Stuffs

  • An enum may NOT be declared in a method
  • An enum can be imported
  • If the JVM has a choice, it will select a method without varargs before selecting a method with varargs
  • When enums are equal, both .equals and == always return true
  • The headMap() method returns the portion of the map whose keys are less than the key sent to it
  • The asList() method of Arrays creates a fixed-size list that is backed by the array, so no additions are possible.
  • A static initialization block is a normal block of code enclosed in braces, { }, and preceded by the static keyword. Used to initialize class variables
  • All enums implicitly extend java.lang.Enum.
  • A class can extend only one other class, an interface can extend any number of interfaces
  • An interface might also contain constant definitions.
  • An abstract class that implements an interface may not implement all interface methods
Skip to toolbar