Shriansh Kumar has Published 173 Articles

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

Shriansh Kumar

Shriansh Kumar

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

954 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

179 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 Create Your Own Annotations in Java?

Shriansh Kumar

Shriansh Kumar

Updated on 19-Jul-2023 18:07:51

392 Views

When we start learning Java, we often wonder about symbols like @override and @inherited. They are a special kind of tag termed as Annotations that can be applied to classes, methods, fields, parameters, and other elements of the code. Java provides support for some built-in annotations, however, we are allowed ... Read More

How to Fix int cannot be dereferenced Error in Java?

Shriansh Kumar

Shriansh Kumar

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

4K+ 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

110 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 VB.NET and Java

Shriansh Kumar

Shriansh Kumar

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

398 Views

VB.NET and Java are the two widely used programming languages available nowadays. They serve to develop a variety of software including web and android applications. The features and capabilities of both languages make it difficult to choose one over another. In this article, we will compare and analyze them based ... Read More

Difference Between trustStore and keyStore in Java

Shriansh Kumar

Shriansh Kumar

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

516 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

255 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

143 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

304 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

Advertisements