Browse by Topic

Popular

Latest

Latest Java Posts

Diagram showing a subclass method calling a parent class method through the super keyword in Java
Java

Java super Method: Calling Parent Class Methods

java super method: Learn how the super keyword calls parent class methods, constructors, and fields in Java, including overriding behavior, interface defaults, and com...

super keywordmethod overridinginheritanceconstructor chaining
Java code showing a subclass using the super keyword to access a parent class field
Java

Accessing Hidden Fields with the super Keyword in Java

Learn how the super keyword accesses hidden superclass fields in Java, the difference between field hiding and method overriding, and when to use super.field.

Java inheritancesuper keywordfield hidingconstructor chaining
Diagram showing a subclass arrow pointing to a parent class, with labels for super constructor and super method call in Java
Java

How to Use Java Super Keyword Correctly

Learn when and where to use the Java super keyword: constructor chaining, invoking parent methods, accessing shadowed fields, and avoiding common mistakes.

super keywordJava inheritanceconstructor chainingmethod overriding
Diagram of a Java class hierarchy with an Animal superclass and Dog and Puppy subclasses, illustrating inheritance and upcasting.
Java

Java Superclass Subclass Basics and Casting

Learn Java superclass and subclass relationships: inheritance, method overriding, upcasting, downcasting with instanceof, constructor chaining, and design trade-offs.

InheritancePolymorphismType CastingJava Objects
Diagram showing a parent class and child class in Java with an arrow indicating inheritance, illustrating the extends relationship.
Java

Java Parent Class Child Class Inheritance Explained

Understand Java parent and child class inheritance: syntax, method overriding, constructors, and runtime behavior with practical examples.

Java inheritanceextends keywordmethod overridingsuper keyword
Illustration of a Java class hierarchy with a superclass and subclass connected by a line, representing inheritance and method overriding.
Java

Java Class Inheritance: Syntax and Behavior Explained

Understand Java class inheritance: `extends`, constructor chaining, `super`, method overriding, access control, and object creation rules with practical examples.

inheritancemethod overridingsuper keywordabstract classes
Diagram showing a Car class extending a Vehicle class with inherited methods and fields
Java

Java extends Keyword: Inheritance Syntax and Behavior

java extends keyword: Explains the Java extends keyword: inheritance syntax, constructor chaining, method overriding, and when to prefer composition.

Java inheritancemethod overridingsuper keywordpolymorphism
Diagram showing a superclass and subclass relationship with an arrow indicating inheritance in Java
Java

Java Inheritance: Syntax and Design Tradeoffs

Java inheritance explained with code examples: extends syntax, method overriding, constructor chains, the super keyword, polymorphism, and composition tradeoffs.

inheritancepolymorphismmethod overridingsuper keyword
Java constant declaration showing final static field and enum comparison in a clean diagram
Java

Java Constant Declaration: Syntax and Best Practices

Learn the correct syntax for Java constant declaration, the difference between compile-time and runtime constants, and when to choose an enum over static final fields.

Javaconstantsfinalenum
A visual comparison of Java's final keyword and immutable object design, showing a locked reference versus a sealed box.
Java

Java final vs immutable: What's the Difference?

java final vs immutable: Understand the difference between Java's final modifier and true immutability, and when each matters in your code.

final keywordimmutabilityconcurrencyobject design