Tumgik
techgiantblog · 4 years
Text
Java 8 - Functional Interface
Java 8 – Functional Interface
An Interface with exactly one abstract method is called a Functional Interface. This term was first introduced in Java 8. Functional Interface can have only one functionality to exhibit and also known as SAM (Single Abstract Method) Interface. This method is called the Functional Method for that functional interface. Functional Interface can have any number of Default and Static methods, but can…
View On WordPress
0 notes
techgiantblog · 4 years
Text
Java - Hashtable vs HashMap
A short article on similarities and differences of Hashtable and HashMap in #java #JavaCollectionFramework #techgiantblog
In this short article we shall discuss about similarities and difference between Hashtable and HashMap of Java Collection Framework (JCF).
Similarities
Both Hashtable and HashMap are collection which implements Map interface. Both of them maps keys to values.
Both of them are having put, get, remove and containsKey methods which provide constant-time performance.
Insertion order of the…
View On WordPress
0 notes
techgiantblog · 4 years
Text
Java - StringBuffer vs StringBuilder
Java – StringBuffer vs StringBuilder
In this article we’ll first look at some important characteristics of String. Subsequently we’ll have a look at how StringBuffer and StringBuilder helps on String operations and also we’ll discuss about similarities and differences between them.
String – Important characteristics
String is immutable. So it is suitable to be used in multi-threaded environment.
String is a final class. All…
View On WordPress
0 notes
techgiantblog · 4 years
Link
Guide on Java - How to catch multiple exceptions in a single catch blog. Please visit https://techgiant.tech.blog/2020/04/15/catching-multiple-exception-types-multi-catch-java-7/ for details
1 note · View note