Shriansh Kumar has Published 173 Articles

Storage of String in Java

Shriansh Kumar

Shriansh Kumar

Updated on 05-May-2023 17:55:07

158 Views

A string is a class in Java that stores a series of characters. Those characters are actually String-type objects. The value of string is enclosed within double quotes. The string class is available in java.lang package. In this article, we will look into the storage mechanism of strings in ... Read More

Java Program for Reversal algorithm for right rotation of an array

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 19:05:09

133 Views

Array is a linear data structure that is used to store group of elements with similar datatypes. It stores data in a sequential manner. Once we create an array we can’t change its size i.e. it can store fixed number of elements. This article will help you to understand the ... Read More

Java Program for Decimal to Binary Conversion

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 18:58:58

3K+ Views

The number system is of four types: Binary, Octal, Decimal and Hexadecimal with base value 2, 8, 10 and 16 respectively. The base value depends on the number of digits contained by number system. For example, hexadecimal number system contains 16 digits i.e. 0 to 9 and A to F. ... Read More

Java program for Hexadecimal to Decimal Conversion

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 18:55:51

617 Views

The number system is of four types: Binary, Octal, Decimal and Hexadecimal with base value 2, 8, 10 and 16 respectively. The base value depends on the number of digits contained by number system. For example, binary number system contains only two digits 0 and 1. Hence, its base is ... Read More

Java Program for Int to Char Conversion

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 18:53:56

167 Views

Java has eight primitive datatypes byte, short, int, long, char, float, double, and boolean. The int is 32-bit signed datatype used to store whole numbers. Its range is from –2, 147, 483, 648 to 2, 147, 483, 647. The char holds 16-bit unsigned Unicode characters. In this article, we will ... Read More

Java Program for Rotate the Matrix Right by K times

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 18:52:46

383 Views

Array is a linear data structure that is used to store group of elements with similar datatypes. It stores data in a sequential manner. When we create an array of two dimensions, i.e., rows and columns, we call it matrix. In this article, we will create a matrix of MxN ... Read More

Java Nested Loops with Examples

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 18:47:28

997 Views

Loops in java are called as control statements because they decide the flow of execution of a program based on some condition. Java allows the nesting of loops, when we put a loop within another loop then we call it a nested loop. Nested loops are very useful when we ... Read More

Java Program to Access all Data as Object Array

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 17:31:52

75 Views

Array is a linear data structure that is used to store group of elements with similar datatypes. We can create an array with primitive datatypes and since a class is considered as user-defined datatype so it is also possible to create array of objects. In this article, we are going ... Read More

Java Program to Access All the Constant Defined in the Enum

Shriansh Kumar

Shriansh Kumar

Updated on 02-May-2023 17:30:28

99 Views

After JDK version 5 java introduces the enumeration. It is a group of constants defined using the keyword ‘enum’. The final variables in java are somewhat similar to enumeration. In this article, we will make a java program in which we define an enum class and try to access all ... Read More

Java Program to Check Array Bounds while inputting Elements into the Array

Shriansh Kumar

Shriansh Kumar

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

67 Views

Array is a linear data structure that is used to store group of elements with similar datatypes. It stores data in a sequential manner. Once we create an array we can’t change its size i.e. it is of fixed length. This article will help you to understand the basic concept ... Read More

Advertisements