Shriansh Kumar has Published 324 Articles

How to Find the Number of Arguments Provided at Runtime in Java?

Shriansh Kumar

Shriansh Kumar

Updated on 19-Jul-2023 18:40:22

932 Views

In Java, one way of passing arguments at runtime is by using the command line or terminal. While retrieving those values of command line arguments, we may need to find the number of arguments provided by the user at runtime which is possible with the help of length property. This ... Read More

How to determine length or size of an Array in Java?

Shriansh Kumar

Shriansh Kumar

Updated on 19-Jul-2023 18:26:08

2K+ Views

In Java, one of the convenient ways to determine the length or size of an array is by using its length property. It counts the number of elements stored in an array and returns the count. Finding the length of an array is one of the common yet crucial operation ... Read More

How to Create TreeMap Objects using Comparable Interface in Java?

Shriansh Kumar

Shriansh Kumar

Updated on 19-Jul-2023 18:11:04

361 Views

TreeMap is a class of Java Collection Framework that implements NavigableMap Interface. It stores the elements of the map in a tree structure and provides an efficient alternative to store the key-value pairs in sorted order. Note that while creating objects of TreeMap we need to use the comparable interface ... Read More

How to Fix int cannot be dereferenced Error in Java?

Shriansh Kumar

Shriansh Kumar

Updated on 19-Jul-2023 17:56:33

6K+ Views

"int cannot be dereferenced", a common error in Java that may occur while converting a variable of integer type into String or while comparing it with other primitive type variables. It might be difficult to debug for a beginner programmer, but once we get the alternative ways of converting and ... Read More

Different Ways to Capture Java Heap Dumps

Shriansh Kumar

Shriansh Kumar

Updated on 19-Jul-2023 17:51:49

235 Views

A heap dump is a snapshot of the memory more specifically the Java heap memory of a Java process at a certain point in time. It contains information about the Java objects and classes. Heap dumps are useful when we need to debug memory problems such as memory leaks, high ... Read More

Difference Between trustStore and keyStore in Java

Shriansh Kumar

Shriansh Kumar

Updated on 19-Jul-2023 17:41:38

1K+ Views

If one is a Java developer and has worked with the Java SSL/TLS, one may have encountered the terms trustStore and keyStore. These two files are used to store cryptographic keys and certificates. Till Java 8, the default format for these files was JKS. With the release of ... Read More

Difference Between State and Strategy Design Pattern in Java

Shriansh Kumar

Shriansh Kumar

Updated on 19-Jul-2023 17:39:23

551 Views

Being a Java developer, one might have encountered some design patterns that help us in structuring our code and make it more reusable and maintainable. Two of these design patterns are the State pattern and the Strategy pattern. The use case of these design patterns is almost the same. However, ... Read More

Difference Between RMI and DCOM

Shriansh Kumar

Shriansh Kumar

Updated on 19-Jul-2023 17:37:25

314 Views

Both RMI and DCOM are the technologies that serve to enable distributed object computing. The RMI is a Java-based technology, DCOM, on the other hand, is developed by Microsoft. Although they are built for the same purpose by two technical market giants, there exist some significant differences in terms of ... Read More

Program to print interesting pattern

Shriansh Kumar

Shriansh Kumar

Updated on 16-May-2023 12:17:40

430 Views

Solving interesting pattern problems enhances the understanding of loops. They are essential because they help in building a strong foundation of a particular programming language. There are various kinds of patterns including number-based, star-based and alphabetical patterns as well. In this article, we will discuss a few Java programs to ... Read More

Program to print Hut Star pattern

Shriansh Kumar

Shriansh Kumar

Updated on 16-May-2023 11:21:11

796 Views

Solving interesting pattern problems enhances the understanding of loops. They are essential because they help in building a strong foundation of a particular programming language. There are various kinds of patterns including number-based, star-based and alphabetical patterns as well. This article will guide you to solve a hut star pattern ... Read More

Advertisements