Skip to content

Category Archives: Java Programs

Given two numbers, the task is to find the HCF of two numbers using Command Line Arguments. GCD (Greatest Common Divisor) or HCF (Highest Common… Read More
Given two numbers, the task is to find the LCM of two numbers using Command Line Arguments. LCM (Least Common Multiple) of two numbers is… Read More
Given two numbers, the task is to swap the two numbers using Command Line Arguments. Examples: Input: n1 = 10, n2 = 20 Output: 20… Read More
Given two Strings, the task is to concatenate the two Strings using Command Line Arguments. Examples: Input: str1 = "hello", str2 = "world" Output: helloworld… Read More
Given three numbers, the task is to find the greatest of three numbers using Command Line Arguments. Examples: Input: A = 2, B = 8,… Read More
Prerequisite: Different Approaches to Concurrent Programming in Java Lambda expressions are very similar in behaviour to anonymous inner classes. They have complete access to code… Read More
Prerequisite: Different Approaches to Concurrent Programming in Java Let’s look at the second approach in detail. The user has the main class that implements runnable… Read More
Prerequisite: Different Approaches to Concurrent Programming in Java Inner Class that implements Runnable In this approach, the user physically puts the class definition of the… Read More
Given a number N, the task is to check if N is a Leap Year or not using Command Line Arguments. Examples: Input: N =… Read More
Given a number N, the task is to check if N is a Prime Number or not using Command Line Arguments.Examples:   Input: N = 7… Read More
Given a number N, the task is to find the Prime Numbers from 1 to N using Command Line Arguments.Examples:   Input: N = 7 Output:… Read More
Given a number, the task is to find the Sum of Digits of this number using Command Line Arguments. Examples: Input: num = 687 Output:… Read More
Given a list in Java, the task is to clone this list. Example: Input: list = [“Geeks”, “for”, “Geeks”] Output: clonedList = [“Geeks”, “for”, “Geeks”]… Read More
Given a string, the task is to check if this String is Palindrome or not using Command Line Arguments. Examples: Input: str = "Geeks" Output:… Read More
Given a string, the task is to reverse this String using Command Line Arguments. Examples: Input: Geeks Output: skeeG Input: GeeksForGeeks Output: skeeGroFskeeG Approach 1:… Read More

Start Your Coding Journey Now!