Compiler Rules for Class Construction in Java

Photo by Anna Earl on Unsplash

Objects in Java are created from inside out.

It goes all the the way up to the Object class, comes down through the hierarchy and initializes all instance variables to create objects.

public class Person {
private String name;

In the above code, there is no statement that the Person extends Object but when creating an object, it…




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Rapid Coding under Pressure: My first competition

The Great Fleece: Composing a Scene

Proof of authority

Why should we care about data variety — Semi Structured Data

Onward and Upward

EC CRUD Operations With Native And Managed DgnEC APIs

How to root Itel Snap S11

Root LG Phone

Cloud Firestore

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Thanoshan MV

Thanoshan MV

More from Medium

Navigation through offline class

Java Tips #01 — Handle validation in an elegant manner using chain of responsibility design pattern

Time Efficiency of Sorting Algorithms

DST In Programs and How To Handle It In Java