Category Java

Recursion in Java

How recursion works in Java

Recursion is an advanced feature provided by Java programming language. The term “recursion” means a method calling itself. Recursion in Java is a basic programming technique in which a method calls itself repeatedly. A method that calls (or invokes) itself…

Command Line Arguments in Java

Java command line arguments example

In this tutorial, we will learn about the command line arguments in Java with the help of example programs. The command line arguments in Java allow the programmers to pass arguments (i.e. values) to the main() method during the execution…

Object Class in Java

Object class in Java

Object class is the superclass of all the classes in Java by default. It is present with a name “Object” in java.lang package. The java.lang.Object class is the root of the Java class hierarchy. It is the topmost class of…

Math Class in Java (with Examples)

Java programming supports the basic mathematical computation through the class Math defined in java.lang package. The java.lang.Math class contains two constants and a collection of methods that we can use to perform basic mathematical operations. The common mathematical operations may…