Author: Rakesh Singh

MCQ – Java Polymorphism

ULTIMATE MCQs – Multiple Choice Questions on Porlymorphism in java oops concept with Answer and Explanation to polish your concepts and help in written test in job interviews. MCQs on Polymorphism in Java Q) What concepts come under Polymorphism in java? Method overloading Constructor overloading Method overriding All the above Q) Which polymorphism behavior do…

Read the full article

Static Block in Java

Learn Static Block in java programming with example. A class can have a Static block, where we perform some operations or write some statements, if we want them to call before calling constructor of the class. Here is the static block defined in the class X. Just write the keyword static and put braces {}…

Read the full article

Static method in Java

Learn static method in java with example i.e. how to write static method in a class and why do we use static methods in application. STATIC METHOD Before explanation, see how we make a method static in a class. It’s simple, just write static keyword before the method.   “Call Static methods of a class…

Read the full article

Final class in Java

Learn Final class in java with program example, uses and if using final class is important in java applications. In java programs, a class is made a final class to stop its extension. Means, if a class is final, it cannot be inherited or extended by sub classes /derived classes. Prerequisite: Concept of inheritance in…

Read the full article

Final variable in java

Learn about final variable in java with example that is how to use final variable in a class field, methods parameter and in an interface in java. We use final keyword before variables in java programs, so, we cannot modify the value once the final variable is initialized. Final variables can be used in multiple…

Read the full article

this keyword in java

Learn this keyword in java with programming uses and examples. – In java programs, this keyword is used in following scenarios in java programs. To refer current class fields(instance variables). To invoke the current class method. To invoke the current class constructor(implicitly). To pass as a current class object as a parameter in the methods.…

Read the full article

Super Keyword in Java

Learn all about Super Keyword in Java with example i.e. where super keyword can be used in java programs. For example, invoking constructor, method and variables etc. of base class from derived class in inheritance relationship. Super keyword can be used for following concepts. Calling super class constructor from derived class. Calling immediate parent class…

Read the full article