Category Java

How to Call Method with Parameters in Java

How to call method with passing parameter in Java

Parameter Passing in Java In the previous tutorial, we have known that the basic method of passing parameters in Java is call-by-value. It means that if a method modifies values of the parameter, its modification will not remain after the…

Return Type in Java

Return types in Java

We know that a method is a function declared inside a class that contains a group of statements. It is used to perform certain tasks or processing of data in the program to yield the expected results. A method can…

Static Block in Java

Static block in Java

When a block is declared with the static keyword, it is called static block in Java. It is a normal block of code enclosed in braces ({ }) and preceded by a keyword “static”. A static block is also known…

Inner Class in Java (with Example)

Inner class in Java with realtime example

So far, we have known the members of the class are variables, methods, constructors, and initializer blocks. But it is also possible to have a class or an interface as a member of a class. A class declared inside another…