Java methods accept parameters, execute business logic and return results. We can pass multiple argument to the methods and it return only one value from the methods. Some real time scenario, we may require to get more than one return ...

The Java language supports three types of comments in code to explain the business logic in code, to explain the algorithm logic to other developers in code itself or to generate the document content in coding itself. Single line comments ...

We are writing method to accomplish business logic in application. We have to pass the argument to methods for processing. We have to understand how the arguments are passed to methods as “Pass by Value”.  Understanding of this is important ...

Earlier we discussed on method overloading, it gives same method name and differ by method signature.  If we are not sure about number of argument(but same type) for the method,  we can’t write one method of each combination of argument ...

“polymorphism” means ‘a state of having many shapes’ or ‘the capacity to take on different forms’.   In Java, Polymorphism is an ability to access objects of related classes through a single, uniform interface. Two types of polymorphism in Java,   ...

Method Overloading : Methods  have business logic that manipulates data(instances variable).   Methods would have method name, input arguments, return type and method body.   Sometimes we require to write two methods which are logically same but differ by input argument list.   Let ...

In this section we would discuss loops , control statements and decision making condition in java.  Always the loops and control statement are just explained as one of the language syntax. But there are so powerful in writing complex business ...

In the previous post, we have discussed more on abstract class and code re-usability aspect. Now let us discuss on another important artifact of java “interfaces”. Abstract class and interfaces may look(but it is not and never) like same with ...

Object oriented programming(OOPS) paradigm enforces code re-usability and avoid redundant code. To implement the code re-usability, OOPS introduces the concept of inheritance. Let see the “Inheritance” definition, A class that is derived from another class is called a subclass (also ...

                A constructor in Java is a block of code similar to a method that’s called when an instance of an object is created. Constructors are used to initialize the object’s state. Like ...