Core java
21 OctoberHow to Sort HashSet in Java
In this post, we will see how to sort HashSet in java. HashSet is a collection which does not store elements in any order. You might come across a situation where you need to sort HashSet. There can be many ways to sort HashSet, we will see two methods here. Using TreeSet You can use […]
21 OctoberDifference between equals() and == in java
In this post, we will see about the difference between equals and == in java. This is most asked java interview question for fresher or 2-year experienced java developer and it might be confusing sometimes. Let’s try to understand each quickly. Equality operator “==” Equality operator can be used to compare primitives but when you […]
20 OctoberJava Array to Set
In this post, we will learn java array to set conversion. [toc] There are many ways to convert array to set. 1. Using Java 8’s Stream If you are using Java 8, I would recommend using Java 8 Stream. package org.arpit.java2blog; import java.util.Arrays; import java.util.Set; import java.util.stream.Collectors; public class ArrayToSetMain { public static void main(String[] […]
16 OctoberCustom BlockingQueue implementation in java
In this post, we will see how to create your own custom BlockingQueue. This is one of the most asked java interview questions. You need to implement your own BlockingQueue. This question helps interviewer to get your understanding of multithreading concepts. Here is simple implementation of BlockingQueue. We will use array to store elements in […]
09 OctoberStake.hu regisztráció és bónusz számolás – Teljes útmutató
A regisztráció egy online kaszinóban gyors, de ha pontosan tudod, mire számíthatsz az egyes lépéseknél, időt és frusztrációt takarítasz meg. Ez az útmutató lépésről lépésre bemutatja, hogyan hozhatsz létre fiókot a Stake Casinón, hogyan számolhatod ki a bónuszodat, és milyen biztonsági intézkedésekkel találkozhatsz. Gyors ellenőrzőlista Ellenőrizd a rendszerkövetelményeket (stabil internet, friss böngésző) Készítsd elő a […]
08 OctoberEnergycasino regisztrációs útmutató – bónuszok és pörgetések kiszámítása
Mielőtt bármely online kaszinóban befizetnél, szánj öt percet ennek az ellenőrzőlistának az átolvasására – ez lefedi azokat a lépéseket, amelyeket a legtöbb játékos kihagy. Ez az útmutató pontosan bemutatja, hogyan regisztrálj, hogyan igényeld az Energycasino 10 free spins ajánlatot, és hogyan számold ki a bónuszok valódi értékét. Előfeltételek Érvényes e-mail cím – a regisztráció megerősítéséhez […]
05 OctoberJava FileReader Example
The FileReader class of java.io package provides a seamless and easy-to-use way to read and analyse the contents of a file using Java. The FileReader class, works similar to the FileInputStream class because it reads the file data as a stream. However, unlike the latter which reads files as a stream of bytes, FileReader reads […]
30 SeptemberLongest common substring
If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. In this post, we will see how to find the longest common substring in java. Program Given two String, find longest common substring. For example: String 1: Java2blog String 2: CoreJavaTutorial Longest common subString is: […]
27 SeptemberPrint maximum occurring character in a String
In this post, we will see how to print the maximum occurring character in a String. Problem Print maximum occurring character in a String For example: String 1: java2blog tutorial Character: a has occurred maximum times in String: 3 ———————- String 2: This is test message Character: s has occurred maximum times in String: 5 […]