
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 7442 Articles for Java

443 Views
TreeSet is a class that implements Set interface in Java. In TreeSet the elements are stored in sorted order as it is implemented internally using a sorted balanced tree called as binary search tree. The elements in the TreeSet are stored in ascending order by default. Union of sets contains all the elements from both sets. Intersection of sets contain all the elements which are commonly present in both sets. In this section, we will be discussing about how to get the union and intersection of two TreeSet using Java. What are the Union and Intersection of Sets? ... Read More

4K+ Views
Size of a file is the amount of storage space occupied by that particular file on a particular storage device such as a hard drive. Size of a file is measured in terms of bytes. In this section, we will be discussing how to implement a java program to get the size of given file in bytes, kilobytes and megabytes. Understanding the file Sizes and Units of Measurement A byte is the smallest unit of digital information. One byte is equal to eight bits. 1 kilobyte (KB) = 1, 024 bytes 1 megabyte (MB) = ... Read More

1K+ Views
LinkedHashSet is a class provided by Java that implements Set Interface. The first element of a LinkedhashSet is nothing but the first element in the collection. In this article, we will discuss different approaches to get the first element from LinkedHashset. What is a LinkedHashSet? A LinkedHashSet is a collection which is a combination of HashSet collection and a LinkedList collection. A HashSet is an unordered collection which doesn't allow duplicates. But, a LinkedList is an ordered collection which stores duplicates Coming to LinkedHashSet as it is a combination of both HashSet and LinkedList it stores the elements in ... Read More

1K+ Views
Motherboard Serial Number is an id assigned to the motherboard of a computer. It is generally used to track the computer system and also to identify when the system is lost or stolen. In this section, we will be discussing different approaches to find the Motherboard Serial Number for Windows and Linux machines using Java programming language. Motherboard is a very crucial part of a computer. It is the backbone of the computer. All the components in a computer communicate through the motherboard. Motherboard helps in determining the factors like the amount of RAM we are going to ... Read More

3K+ Views
Computers can connect to a network and communicate with other devices using a hardware or software component known as Network Interface Controller (NIC). NIC helps in creating a layer which helps in transmitting and receiving data between two devices. MAC address known as Media Access Control address is a unique identifier of NIC. It is of 48 bits of hexadecimal digits. It is used by the data link layer to control access, ensure data integrity, and identify network devices. In this section, we will be learning about how to find a MAC address of a Windows and Linux machine using ... Read More

4K+ Views
In Java, HashSet is a class which implements Set Interface. HashSet is a collection of unique elements which doesn’t store or allow us to store duplicate elements. In this section, we will be discussing about different approaches in java to find the first element and last element of a HashSet using Java programming Language. The HashSet class in java is implemented using a hash table. It uses hash code to retrieve data quickly from the table in HashSet, the order of elements is not preserved i.e., it doesn’t store the elements in the order in which we add elements ... Read More

3K+ Views
IP Address, also known as the Internet Protocol Address is a unique identifier that is assigned to a device in a network to identify the devices in the network and establish a connection between them. In this section, we will learn how to find the IP Address of a Windows and Linux Machine using Java Code. The IP Address can be represented in two formats. One format is IPv4 which is a 32 format containing decimals and dots. It has two parts, one part is network ID which identifies the network and the other is host ID which identifies ... Read More

2K+ Views
LinkedHashSet is a class provided by Java which Implements Set Interface. LinkedHashSet is implemented as a hash table with a linked list running through it, so it is more efficient that HashSet and also maintains orders. It is useful when you need a collection that maintains order and does not allow duplicates. In this section, we will discuss different approaches to get the elements from LinkedHashset by index. What is a LinkedHashSet? A LinkedHashSet is a collection which is a combination of HashSet collection and a LinkedList collection. A HashSet is an unordered collection and also doesn’t allow duplicates. ... Read More

4K+ Views
Last Modification Date of a File refers to the last date on which the file data is edited. We have various functions in java to find the last modification date of a file. In this section, we will be discussing different approaches of implementing a java program to get the last modification date of a file. File is a collection of information which may contain data such as text information, images, audio, videos, program code. These can be accessed by any software applications to perform actions like read, write, update, delete etc. We will now look in to each function ... Read More

475 Views
Collections in Java is a framework which provides classes and interfaces to manipulate group of objects. Collections help in storing and manipulating different types of objects in java. Size of the collection tells us how many elements are present in that particular collection. Java provides various collection classes namely ArrayList, LinkedList, HashSet, and TreeSet, among others. In this section, we are going to write a java program to get the size of collection and verify the collection is empty or not. The different types of collections in Java are − List − List is an ordered collection of objects ... Read More