Shriansh Kumar has Published 324 Articles

Java Program to check Eligibility of TPP students for appearing in Interviews

Shriansh Kumar

Shriansh Kumar

Updated on 06-Jun-2025 13:58:45

311 Views

Checking Eligibility of TPP Students in Java Consider the following table for eligibility criteria of different companies for appearing in interviews: ... Read More

Java Program to Allocate and Initialize Super Class Members using Constructor

Shriansh Kumar

Shriansh Kumar

Updated on 06-Jun-2025 13:57:24

484 Views

In Java, super refers to the parent class instance, and to inherit members of the super class to the child class, we use the extends keyword. Before writing a Java program to allocate and initialize super class members using a constructor, let's go through some concepts we are going to use ... Read More

What is a constant and how to define constants in Java?

Shriansh Kumar

Shriansh Kumar

Updated on 06-Jun-2025 13:38:33

34K+ Views

Constants in Java A constant is a variable whose value cannot be changed once it has been initialized. Java doesn't have built-in support for constants. To define a variable as a constant, we just need to add the keyword "final" in front of the variable declaration. It is not ... Read More

Java Program to Check Armstrong Number

Shriansh Kumar

Shriansh Kumar

Updated on 06-Jun-2025 13:27:53

14K+ Views

In number theory, an Armstrong number is a pattern-based number whose sum of each digit raised to the power of total number of digits is equal to the given number itself. This article aims to explain Java programs that checks whether the given number is Armstrong or not. How to ... Read More

Java program to check if a given number is perfect number

Shriansh Kumar

Shriansh Kumar

Updated on 06-Jun-2025 13:17:34

2K+ Views

When the sum of factors of a given number (after discarding the given number) is equal to the number itself is called a perfect number. The sum of these divisors is known as the aliquot sum. Therefore, we can say that a number is perfect if it matches its aliquot ... Read More

Java program to check whether a number is even or odd

Shriansh Kumar

Shriansh Kumar

Updated on 06-Jun-2025 13:10:00

1K+ Views

We are given an integer number as input, and our task is to write a Java program to check whether that number is even or odd. If a number is divisible by 2, then it is an even number otherwise, it is odd. To verify a given number is ... Read More

Java Program to Convert Decimal to Octal

Shriansh Kumar

Shriansh Kumar

Updated on 06-Jun-2025 13:04:10

763 Views

The octal number system has a base value of 8 as it contains digits from 0 to 7, i.e., 8. On the other hand, the decimal number system has 10 digits from 0 to 9. Hence, its base value is 10. In this article, we will learn to convert decimals to ... Read More

Java Program to Add Characters to a String

Shriansh Kumar

Shriansh Kumar

Updated on 30-May-2025 17:54:49

13K+ Views

Java Program to Add Characters to a String Java provides different ways to add characters to a string. We can add characters in the beginning or at the end or at any position according to the need. In this article, we are going to see three different approaches to do ... Read More

Java Program to Check if a given Class is a Local Inner Class

Shriansh Kumar

Shriansh Kumar

Updated on 30-May-2025 17:47:00

266 Views

The nested class that is defined inside the body of a method or within a loop, like for and if, is called a local inner class. Before making a Java program to check whether a given class is a local inner class or not, we need to understand the concept ... Read More

Java Program to Add the nth Square Series

Shriansh Kumar

Shriansh Kumar

Updated on 30-May-2025 17:29:59

299 Views

The sum of the nth squares series is a form of arithmetic progression where the sum of squares is arranged in a sequence with the initial term as 1, and n being the total number of terms. 12 + 22 + 32 + ... + n2 In this article, ... Read More

Advertisements