Java 8 Default and static methods in Interfaces
Ashok Veer | May 22, 2020 |
Default and static methods in interface
|
Java 8 Default and static methods
Be the first to comment!
Inner classes in java
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
Static inner class in java
Ashok Veer | May 21, 2020 |
Static inner class in java
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
Functional Interfaces
Ashok Veer | May 18, 2020 |
Functional Interfaces
|
java 8 functional interface tutorial
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 . . .
Java 8 features with examples
Ashok Veer | May 17, 2020 |
Java 8 features with examples
Be the first to comment!
java 8 features techfloaters |
Hashtable in java
Ashok Veer | May 15, 2020 |
example of Hashtable
|
Features in Hashtable in java
|
Hashtable in java
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..Best Way to Iterate Any Map in java
Ashok Veer | May 10, 2020 |
Best Way to Iterate Any Map in java
|
best way to iterate hashmap in java
|
iterate hashmap java 8
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.
Treemap vs Hashmap
Ashok Veer | May 09, 2020 |
Difference between HashMap and TreeMap
|
HashMap vs TreeMap
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.
TreeMap in java
Ashok Veer | May 09, 2020 |
Example of TreeMap
|
Features of TreeMap
|
TreeMap in Java
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...
HashMap in java
Ashok Veer | May 06, 2020 |
Example of HashMap
|
HashMap in java
|
java hashmap implementation
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.
TreeSet Class in Java with example
Ashok Veer | May 03, 2020 |
Class declaration in TreeSet class
|
Feature of TreeSet class
|
Java TreeSet class with Example
|
TreeSet class
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.
LinkedHashSet in java
Ashok Veer | May 01, 2020 |
Example of LinkedHashSet
|
Features of LinkedHashSet
|
LinkedHashSet class
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 ...
Subscribe to:
Posts (Atom)