Object Class in Java

Object class in Java, residing in java.lang package is the root of the Java class hierarchy. Every class in Java inherits either directly or indirectly from the Object class. If a Java class doesn’t extend any other class then also it implicitly extends Object class making it a direct descendant…

Continue reading

final in Java

final keyword in Java can be used with a field, method or class. In whichever context you use final in Java, it restricts the access in some way. Final variable – If a field is declared as final its value can’t be changed once assigned. Final method – A method…

Continue reading