Found 2616 Articles for Java

Different Ways to Capture Java Heap Dumps

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 memory consumption, and out of memory errors. Java provides several ways to capture these heap dumps that we are going to explore in this article. Ways to Capture Java Heap Dumps The following ways can be used to capture Java heap dumps: ... Read More

Difference Between VB.NET and Java

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

400 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 on some parameters such as syntax, features, performance, and applications to point out the difference between VB.NET and Java. VB.NET vs Java VB.NET It is an abbreviation that stands for Visual Basic .NET. It is a high-level and object-oriented programming language that was developed by Microsoft ... Read More

Difference Between trustStore and keyStore in Java

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

520 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 Java 9, the default format changed to PKCS12. Here, JKS is a Java specific format, whereas the PKCS12 is a language independent format. In this article, we will discuss the difference between trustStore and keyStore in Java. trustStore vs keyStore trustStore It is a file ... Read More

Difference Between State and Strategy Design Pattern in Java

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

256 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, they are different from each other in many ways. In this article, we are going to explore the differences between state and strategy design patterns in Java. State vs Strategy Design Pattern State Design Pattern The State pattern is a behavioral design pattern that allows an object ... Read More

Difference Between RMI and DCOM

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 design, implementation and usage. We are going to compare and list some differences between RMI and DCOM in this article. RMI vs DCOM Distributed Objects To understand the differences between RMI and DCOM, it is necessary to understand distributed object computing as both terms come under the same umbrella. ... Read More

Working with UDP DatagramSockets in Java

Siva Sai
Updated on 19-Jul-2023 21:36:39

434 Views

Introduction Networking is a critical component of modern software development. In Java, one of the ways we can establish network communication is by using sockets. While most are familiar with stream-oriented, connection-based TCP sockets, this article focuses on the connectionless, packet-oriented UDP DatagramSockets and how to work with them effectively. Understanding UDP and DatagramSockets User Datagram Protocol (UDP) is one of the core protocols in the Internet Protocol Suite. Unlike TCP, it is connectionless and does not guarantee delivery, order, or error-checking of data packets. However, it is faster and more efficient for lightweight or time-sensitive applications In Java, the ... Read More

What is Java Parallel Streams?

Siva Sai
Updated on 19-Jul-2023 21:19:53

755 Views

Introduction Parallel processing is a cornerstone of modern computing, allowing us to take full advantage of multi-core systems. In the realm of Java, one of the tools at our disposal to utilize this power is parallel streams. This article delves into the concept of parallel streams in Java, exploring their functionality, benefits, and how to use them effectively. Understanding Java Parallel Streams Java Streams were introduced in Java 8 as a way to perform complex data processing tasks on collections of objects, often referred to as a stream of data. These operations can be executed sequentially or in parallel. A ... Read More

What is Java AWT Graphics?

Siva Sai
Updated on 19-Jul-2023 21:13:50

267 Views

Introduction The Abstract Window Toolkit (AWT) forms the backbone of Java's original platform-independent windowing, graphics, and user-interface toolkit. One of its key components, the Graphics class, plays a vital role in creating and controlling graphical content in Java applications. This article provides an in-depth overview of the Graphics class in Java AWT, including its functionality, key methods, and example usage Understanding the Graphics Class The Graphics class, located within the java.awt package, is an abstract superclass that provides a unified interface for drawing shapes, text, and images onto the screen. It encapsulates the basic drawing operations that every device must ... Read More

What is Java Adapter Class?

Siva Sai
Updated on 19-Jul-2023 21:10:34

3K+ Views

Introduction In Java, the Adapter design pattern plays a crucial role in helping disparate classes work together by converting the interface of one class into an interface expected by the clients. But Java swings the Adapter pattern into a different dimension with the introduction of Adapter Classes. This article delves into Java Adapter Classes, understanding their purpose, their benefits, and how to use them effectively. Adapter Classes in Java In Java's event handling mechanism, adapter classes are abstract classes provided by the Java AWT (Abstract Window Toolkit) package for receiving various events. These classes contain empty implementations of the methods ... Read More

What is Heap Pollution in Java and how to resolve it?

Siva Sai
Updated on 19-Jul-2023 21:07:33

259 Views

Introduction Heap pollution is a situation that arises in Java during runtime when a variable of a parameterized type refers to an object that is not of that parameterized type. It's a term often encountered when working with generics. This article seeks to unravel the concept of heap pollution in Java and provide guidance on how to resolve and prevent it What are Generics in Java? Before we delve into heap pollution, let's quickly review Java generics. Generics were introduced in Java 5 to provide type-safety and to ensure that classes, interfaces, and methods could be used with different data ... Read More

Advertisements