Core java
30 AugustJava 8 Lambda Expression examples using Comparator
Java 8 has made comparator more powerful using Lambda Expression. It has introduced many new APIs for Comparator. Let’s go through some new features of the Comparator using Lambda expression.Let’s create a very simple class called Employee: [crayon-6a29b647132d5540180044/] Sort Employee list by name in classic way: We will sort employee list in classic way [crayon-6a29b647132e3251277916/] […]
17 JulyHow to create custom exception in java
In this post, we will see how to create custom exception in java. It is very simple to create custom exception in java. You just need to extends Exception class to create custom exception. Lets understand this with example. You have list of counties and if You have “USA” in list of country, then you […]
17 JulyPraktičen vodič za casino online: registracija, bonus in namigi
Ustvarjanje računa v spletni igralnici je hitro, vendar natančno vedenje, kaj pričakovati na vsakem koraku, prihrani čas in frustracije. V pričujočem vodiču vam bomo predstavili korake za registracijo pri casino online Betano, kako izkoristiti Betano bonus ter pomembne podrobnosti, ki jih morate vedeti. Before You Start Prepričajte se, da ste stari vsaj 18 let. Pripravite […]
15 JulyJava String Interview questions and answers
In this post, we will see interview questions on java String. String is most important data type which we use in our programs very often. 1. Why String is declared final or immutable in java? There are various reasons to make String immutable. String pool Thread Safe Security Class Loading Cache hash value You can […]
15 JulyFind all Permutations of a String in java
In this post, we will see how to find all permutations of String in java. We will use a very simple approach to do it. Take out first character of String and insert into different places of permutations of remaining String recursively. Lets say you have String as ABC. So we take out A from […]
14 JulyHow to use connection pool using service locator design Pattern in java
In this post, you will learn about the Connection Pool. This post is intended by java application development experts for entire development community to let people learn and acknowledge about Connection Pool and how to use its object using Service Locator design pattern. Introduction Connection pool is a mechanism which applicable for all technologies in […]
14 JulyDifference between checked and unchecked exception in java
In this post, we will see difference between checked and unchecked exception in java. It is important question regarding exceptional handling. What is Exception? Exception is unwanted situation or condition while execution of the program. If you do not handle exception correctly, it may cause program to terminate abnormally. What is checked exception? Checked exceptions […]
13 JulyDifference between StringBuffer and StringBuilder in java
In this post, we will see difference between StringBuffer and StringBuilder in java StringBuffer vs StringBuilder Parameter StringBuffer StringBuilder Thread-safe StringBuffer is thread safe. Two threads can not call methods of StringBuffer simultaneously. StringBuilder is not thread safe, so two threads can call methods of StringBuilder simultaneously. Performance It is less performance efficient as it […]
11 JulyDifference between CountDownLatch and CyclicBarrier in java
In this post, we will see difference between CountDownLatch and CyclicBarrier in java. Lets first see similarities among them. Both wait for specific number of threads or tasks to finish. Lets see differences between CountDownLatch and CyclicBarrier. CountDownLatch vs CyclicBarrier Parameter CountDownLatch CyclicBarrier Reuse It can not be reused once count reaches 0 It can […]