Totally exit from loop(for,while,do~while) or from switch. Example… Output… exit only current turn from loop(for,while,do~while), ...
Category ‧ Java
What is enum and When to use
Enum is a predefined list of values which do not represent some kind of numeric or textual data. You can use enums when a variable can only take ...
extends (and super) vs. implements
extending a class A extends B Both classes or both interfaces extends parent class’ already defined methods Also possible to override the methods ...
Interface vs. Abstract class vs. Concrete class
uses “implements” to be implemented multiple interfaces can be implemented interface can extends only interface uses “extends” to be extended if ...
final
Variable Variable cannot be changed Method Method cannot be modified Class Nobody can extend this class That means, no body can override methods ...
super vs. this
super : used to access methods of the base class this : used to access methods of the current class The third line is printing “animal : eat” ...
Overloading vs. Overriding
When making multiple methods with using same method’s name Parameter has to be different When trying to edit parent class’ method. Method name ...