- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 34484 Articles for Programming
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
187 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 so that we can maintain the sorting order of its elements. In this article, we are going to discuss a few Java programs to create TreeMap objects using comparable interface. Java Program to create TreeMap Objects using Comparable Interface Before jumping to the Java program ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
405 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 to create our own annotations too. In this article, we are going learn how to create and use our own custom annotations. Creating Custom Annotations in Java Before creating our own annotations, let's familiarize ourselves with the basics of annotations in Java. Annotations They are ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
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 comparing integers, it will become a piece of cake for us. Try to stick with us till the end of this article to find the reasons and possible solutions for fixing the 'int cannot be dereferenced error'. How to Fix int cannot be dereferenced Error in Java ... Read More
![Way2Class](https://www.tutorialspoint.com/assets/profiles/682997/profile/60_3626763-1689653460.jpg)
3K+ Views
Having the upper hand in computer operating systems, the CPU scheduling algorithm is a widely used method for scheduling processes. It is intended to make sure that the most important processes have priority access to the CPU so that system responsiveness and efficiency are maximized. Each process in preemptive priority scheduling is given a priority value, which is often established by the nature and significance of the current job. When a higher-priority process becomes available, the one that is presently executing is preempted and the higher-priority process is executed in its place. The highest priority process is granted access to ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
112 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
![Siva Sai](https://www.tutorialspoint.com/assets/profiles/641140/profile/60_712060-1681791038.jpg)
449 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
![Siva Sai](https://www.tutorialspoint.com/assets/profiles/641140/profile/60_712060-1681791038.jpg)
766 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
![Siva Sai](https://www.tutorialspoint.com/assets/profiles/641140/profile/60_712060-1681791038.jpg)
276 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
![Siva Sai](https://www.tutorialspoint.com/assets/profiles/641140/profile/60_712060-1681791038.jpg)
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
![Siva Sai](https://www.tutorialspoint.com/assets/profiles/641140/profile/60_712060-1681791038.jpg)
83 Views
Introduction In Java, concurrency and multithreading are fundamental concepts that facilitate simultaneous execution of two or more parts of a program to maximize the utilization of CPU. The start() method plays a pivotal role in this process. This article delves into the workings of the start() function in Java multithreading, explaining its purpose and significance. Java Multithreading A Brief Overview Multithreading is one of Java's core features, allowing multiple sequences of code, known as threads, to execute concurrently within a single program. By enabling concurrent execution, Java allows more efficient use of CPU resources, particularly on systems with multiple ... Read More