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

Here Is 4 Ways To Print ArrayList Elements In Java

Learn 4 Techniques to PRINT ArrayList Elements in Java with Code Example. To print elements, first we’ll create a String ArrayList and store weekdays name as strings into it and display them using following ways: For-loop For-each loop Using iterator Using List-iterator Here is a string ArrayList. We have created an object of the list…

Read the full article

Static Variable in Java

Learn Static variables in java with example and how it is different than non-static variables of a class in java programming. For better understanding, we will use static and non static (instance variables) both in example. STATIC VARIABLES A static variable is shared by all objects of the class. Meaning, static variable has only copy…

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