
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 9128 Articles for Object Oriented Programming

1K+ Views
Acquiring values of system properties and environment variables plays a pivotal role in accessing critical configuration information within applications written using Java. System properties encompass various elements of a system, such as its Java installation directory or version number or user preferences. Environment variables, on the other hand, are dynamic values set either by an operating system or user that impact application performance. By accessing these properties and variables, you gain invaluable insights into the system configuration that enable you to adapt your code accordingly for greater compatibility, customization and seamless integration into its surrounding environment. Environment ... Read More

786 Views
Retrieving the last element from a LinkedHashSet in Java means retrieving its final element present in its collection. Although Java does not come equipped with built-in methods to help retrieve this last item from its LinkedHashSets, multiple effective techniques exist that provide flexibility and convenience, efficiently retrieving this final element without disrupting insertion order - something Java developers must contend with effectively within their apps. By employing such strategies effectively into their software projects they can achieve optimal solutions to meet this requirement efficiently. LinkedHashSet LinkedHashSet is an efficient data structure in Java that combines features from HashSet ... Read More

1K+ Views
In Java, concurrent programming often involves managing multiple threads and distinguishing them from one another. One crucial aspect of thread management is obtaining the unique identifier of the currently running thread. Knowing how to get the ID of a current running thread is essential for tasks like tracking thread behavior, synchronization, and debugging. This tutorial explores various Java methods to do just this. Thread Java's threads are lightweight units of execution within programs, providing parallel execution of tasks and providing one sequential flow of control within them allowing programs to carry out multiple operations concurrently. Each thread runs independently ... Read More

2K+ Views
Introduction Message passing, a method of transferring communications among items or threads, is an essential idea in distributed systems and parallel programming. The transmission of messages in Java may be accomplished with an assortment of methods and structures, based on the implementation's particular needs Using the power source java.util.concurrent the container, which offers an array of interfaces and class libraries for establishing and handling threads that are active locks, and synchronization mechanisms, is a single method for implementing passing messages in Java, for instance. An Executor interface, for instance, is able to be utilized without delay to carry out duties, ... Read More

1K+ Views
Threads are an important aspect of Java programs. They are also known as lightweight processes. Every program in Java has at least a main thread. They play a very important role to run multiple tasks at the same time. They run in the background and do not affect the execution of the main program. The use of multiple threads simultaneously is called multithreading. States of a Thread A thread can exist in either of the following states. It has a complete lifecycle from its creation to destruction. The thread lifecycle states are- ... Read More

6K+ Views
Input and output are the vital components of all the programming languages. Same is the case with Java. User input is very crucial for creating dynamic and interactive applications. Usually the input is a single value but we can also take input from the user separated by space. This article deals with how to take input from the user separated by spaces in Java. Ways to Take Input From User Separated By Space in Java There are 2 ways by which we can take the input from the user separated by space. They are as follows- ... Read More

205 Views
At times, we need information related to a class file. In such a case, we can use the javap tool provided by the Java Development Kit (JDK). We can get more information related to the methods, constructors, and fields present in the class. The purpose of the javap tool is to disassemble one or more class files. It is also known as Java Class File Disassembler. Using the javap tool, we can get more information about the bytecode information about that particular class. The output may vary depending on the options used. Syntax The syntax of javap is ... Read More

958 Views
A TreeSet in Java stores unique elements in sorted order. It implements the SortedSet interface. The TreeSet interface internally uses a balanced tree called the Red-Black tree. A List in Java is a data structure that is used to store elements in the order in which they were added. We can create a TreeSet with a List in Java in many ways. This article deals with the ways in which a TreeSet can be created using a List in Java. Ways to Create a TreeSet with a List in Java There are 3 ways by which a TreeSet ... Read More

560 Views
You are given a directed and unweighted graph G and an integer K. You have to find the number of paths in the graph of length K. Here the graph is in the form of an adjacency matrix. From vertex i to j, if there exists an edge, it is denoted by G[i][j]=1 else denoted by G[i][j]=0. Input A directed and unweighted graph represented by an adjacency matrix Integer K that denotes the length of path to be found Output Total number ... Read More

719 Views
Introduction In this tutorial, we will walk you through the process of setting up a Java development environment in Visual Studio Code (VS Code) and introduce you to some useful tools and techniques for competitive programming, including fast input/output (I/O) techniques and useful code snippets. Setting up Java Development Environment in VS Code To start coding in Java within VS Code, follow these steps − Install Java Extension Pack− Open VS Code and navigate to the Extensions view by clicking on the square icon on the left sidebar or by using the shortcut Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac). Search ... Read More