Shriansh Kumar has Published 173 Articles

Java Program to check the accessibility of an Instance Variable by a Static Method

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 17:01:18

95 Views

The static methods are defined using static keywords but to declare instance variables we don’t use static keywords. Generally, we can’t access the instance variable by a static method. In this article, we will create an instance variable and then we will check the accessibility of that instance variable by ... Read More

Java Program to Check if a given Class is an Anonymous Class

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 16:57:38

95 Views

The type of nested inner class that has no name is called as anonymous class. Before making a java program to check if a given class is an anonymous class we need to understand the concept of nested class. Let’s discuss this in detail. Nested Class When we create class ... Read More

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

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 16:54:05

130 Views

The nested class that is defined inside the body of a method or within a loop like for and if, is called as 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 data from the Specified Collection in the Current Collection

Shriansh Kumar

Shriansh Kumar

Updated on 25-Apr-2023 18:05:13

184 Views

In java, collection is an object or we can say a container for simplicity that allows us to group several numbers of objects in a single unit. The collection interface is present at the root of all collection framework interfaces. We can perform various operations on collection like adding, removing, ... Read More

Java Program to Add the nth Square Series

Shriansh Kumar

Shriansh Kumar

Updated on 25-Apr-2023 18:04:40

127 Views

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

Java Program to Allocate and Initialize Super Class Members using Constructor

Shriansh Kumar

Shriansh Kumar

Updated on 25-Apr-2023 18:04:07

261 Views

In java, super refers to the parent class and to inherit one class to another class we use extends keyword. Before making a java program to allocate and initialize super class members using constructor, let’s go through some concepts we are going to use in this article. What is Constructor? ... Read More

Java Program to Add two Numbers without using Arithmetic Operator

Shriansh Kumar

Shriansh Kumar

Updated on 25-Apr-2023 18:03:03

2K+ Views

Arithmetic operators such as +, -, *, / are used to perform mathematical operations like addition, subtraction, multiplication, modulo and division. We all have done addition of two numbers using + operator but in this article, we are going to see a few java programs that can add two numbers ... Read More

Java Program to Calculate difference between two Time Periods

Shriansh Kumar

Shriansh Kumar

Updated on 25-Apr-2023 18:02:07

481 Views

To work with date and time in java, we need to import java.time, java.util and java.text packages. We are going to use the following classes and methods provided by these packages to calculate difference between two time periods in java − SimpleDateFormat class Date class LocalDate class Period class ... Read More

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

Shriansh Kumar

Shriansh Kumar

Updated on 25-Apr-2023 18:00:43

194 Views

Consider the following table for eligibility criteria of different companies − CGPA Eligible Company Greater than or equal to 8 Google, Microsoft, Amazon, Dell, Intel, Wipro Greater than or equal to 7 Tutorials point, accenture, Infosys, Emicon, Rellins Greater than or equal ... Read More

Java Program to Check if JVM is 32 or 64 bit

Shriansh Kumar

Shriansh Kumar

Updated on 25-Apr-2023 17:57:09

668 Views

Before making java program to check if JVM is 32 or 64 bit, let’s first discuss about JVM. JVM is java virtual machine that is responsible for executing the byte code. It is a part of Java Runtime Environment (JRE). We all know java is platform independent but the ... Read More

Advertisements