Java 8 Default and static methods in Interfaces

Ashok Veer | May 22, 2020 | | Be the first to comment!

Java 8 Default and static methods in Interfaces
Java 8 is come up with really good features likes Funtional interface, Lambda expression, Stream, static and default method in interface etc.
Before java 8 an interface in java can contain only abstract method so now java 8 allow having default and static methods.

Default methods are allowing developers to add new method with new functionality without affecting the classes that implements these interfaces. 

read more . . .

read more...

Inner classes in java

Ashok Veer | May 21, 2020 | | Be the first to comment!

In java inner class which is defined inside another class is called nested class or non-static inner class. For instantiating the inner class or nested class object we first need to create the outer class object. We can access outer class member’s variables insides of inner class just like normal members variables of class.

We cannot declare static method or static variable inside the non-static inner class. If we try to declare it shows error The field or static variable cannot be declared static in a non-static inner type.  read more


read more...

Static inner class in java

Ashok Veer | May 21, 2020 | Be the first to comment!


In java a static class which is defined inside another outer class is called static nested class or static inner class. A static inner class is nested class which can be accessed without creating the object of the outer class. We can access like static other static members of class.
A static inner class have does not access to the outer class instance variable and methods. Below is syntax of the static nested class. read more

read more...

Functional Interfaces

Ashok Veer | May 18, 2020 | | Be the first to comment!

A functional Interface concept introduced in java 8 with some amazing features. So let’s check it out properties and example.

Functional interface in java is an interface which contains only a single abstract method and can contain any number of default and static methods which do have an implementation. read more . . .

read more...

Java 8 features with examples

Ashok Veer | May 17, 2020 | Be the first to comment!



java 8 features techfloaters
java 8 features techfloaters
Java 8 is long term support (LTS) release in 18 March 2014, in this article I will summarizes the features and enhancements in Java SE 8. There are many packages and symbols are introduced in java 8.

So from Java 8 onwards java also supports functional programming like other languages like Python, Erlang, Haskell etc.  read more..

read more...

Hashtable in java

Ashok Veer | May 15, 2020 | | | Be the first to comment!
Hashtable in java

Java Hashtable class is available since jdk1.0 which is oldest class in java present in java.util package. Java Hashtable internally contains buckets where the key/value pairs are stored in buckets.

A Hashtable class is an array of a list structure. Each list is known as a bucket. The position of the bucket is identified by calling the hashcode() method.
read more..
read more...

Best Way to Iterate Any Map in java

Ashok Veer | May 10, 2020 | | | Be the first to comment!

Best Way to Iterate Any Map in java


Best way to iterate map in java- techfloaters

Iterating over Map in java there are basically 4 different ways in this article we will look each and every one by one with example. Also we will use Java 8 forEach() method for iterating all the Map interface child class.


read more...

Treemap vs Hashmap

Ashok Veer | May 09, 2020 | | Be the first to comment!

Treemap vs Hashmap

In this topics we are discussing the very interesting topics about difference between

HashMap and TreeMap. Basically both directly or indirectly implements Map interface so some of the functionality is common in both. Still there is some major differences based upon that we can use any one of them in our project.

read more...

TreeMap in java

Ashok Veer | May 09, 2020 | | | Be the first to comment!



The TreeMap is sorted according to the natural ordering of its keys, or by a Comparator provided at map creation time, depending on which constructor is used.
Java TreeMap is a part of collection since jdk 1.2 versions and available in java.util package. TreeMap implements the Map interface and extends AbstractMap class. TreeMap stores data in key & value pairs. read more...


read more...

HashMap in java

Ashok Veer | May 06, 2020 | | | Be the first to comment!


HashMap uses Hashing technique for storing key and value pair in java.
The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls.


Java HashMap is a part of collection since jdk 1.2 versions. HashMap implements the Map interface and extends AbstractMap class. HashMap stores data in key & value pairs.  



read more...

TreeSet Class in Java with example

Ashok Veer | May 03, 2020 | | | | Be the first to comment!
TreeSet Class in Java with example

Java TreeSet class which implements NavigableSet interface which is child interface of SortedSet interface. Objects in TreeSet class are stored in sorted ascending order.
TreeSet is similar to HashSet except that it sorts the elements in the ascending order while HashSet doesn’t maintain any insertion or ascending order.
read more...

LinkedHashSet in java

Ashok Veer | May 01, 2020 | | | Be the first to comment!

Java LinkedhashSet class is collection class which implements Set interface. HashSet does not maintains insertion order but LinkedHashSet maintains insertion order of object also LinkedHashSet class is non-synchronized. 
read more ...
read more...
 
Copyright © 2019 techfloaters • All Rights Reserved.
Template Design by Ashok Veer ( veersoft solution)