Pad a String with Spaces inJava
Since Java 1.5 we can use the
method java.lang.String.format(String
, object) and use printf like format.
The
format string "%1$15s" will
do the job. Where 1$ indicates the
argument index, s indicates that
the argument is a String 15 represent the
minimal...
Pad a String with Spaces in Java
Ashok Veer | June 12, 2020 |
Pad a String with Spaces in Java
Be the first to comment!
read more...
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!
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...
Inner classes in java
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...
Static inner class in java
Ashok Veer | May 21, 2020 |
Static inner class in java
Be the first to comment!
Static inner class in java
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...
Functional Interfaces
Ashok Veer | May 18, 2020 |
Functional Interfaces
|
java 8 functional interface tutorial
Be the first to comment!
Functional Interfaces
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....
Java 8 features with examples
Ashok Veer | May 17, 2020 |
Java 8 features with examples
Be the first to comment!

Java 8 features with examples
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...
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...
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()...
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...
TreeMap in java
Ashok Veer | May 09, 2020 |
Example of TreeMap
|
Features of TreeMap
|
TreeMap in Java
Be the first to comment!
TreeMap in java
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...
HashMap in java
Ashok Veer | May 06, 2020 |
Example of HashMap
|
HashMap in java
|
java hashmap implementation
Be the first to comment!
HashMap in java
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...
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...
LinkedHashSet in java
Ashok Veer | May 01, 2020 |
Example of LinkedHashSet
|
Features of LinkedHashSet
|
LinkedHashSet class
Be the first to comment!
LinkedHashSet in java
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 ......
HashSet in java
Ashok Veer | April 30, 2020 |
Example of HashSet
|
Features of HashSet
|
HashSet
|
HashSet in java
Be the first to comment!
HashSet in java
Java
HashSet is an collection class which implements Set interface. It is an
un-ordered collection means insertion order is not followed of object in
which duplicate value are not allowed. read more.....
List in Java

List in Java
Java
List interface is an ordered collection which follows the insertion order of the element. The user of this interface has precise
control over where in the list each element is inserted. We can access the
element by their...
Vector class in java
Ashok Veer | April 28, 2020 |
Features of Vector class
|
how to implement vector class in java
|
vector class example
|
Vector class in java
Be the first to comment!
Vector class in java
Vector class is
synchronized in nature that’s why whatever operations we perform on vectors.
Vector class automatically applies a lock to that operation.
Vector class
implements List interface so vector class is also growable in nature which
internally resizes array when the elements gets added...
Linked List in Java
Ashok Veer | April 26, 2020 |
how to create a linked list in java
|
implement linked list in java
|
Linked List in Java
|
LinkedList
Be the first to comment!
Linked List in Java
LinkedList in java is linear data structures
in which element are stored in the different locations and element that are
stored in the different location of memory are called as node. read more ... ...
Beginning of java

Beginning of Java
Beginning of java from techfloaters
Initially, James Gosling other team members started to develop the project in C++, but they faced many problems in C++ compiler regarding with different platform.
So that time,...
How ArrayList works internally in java
Ashok Veer | April 24, 2020 |
How ArrayList works internally in java
Be the first to comment!
How ArrayList works internally in java
ArrayList internally uses array data structure and ArrayList grows
dynamically when the element are added in the ArrayList as it is create the new
array with size greater by its original array capacity…. read more....
Java Collections - ArrayList
Ashok Veer | April 23, 2020 |
ArrayList
|
How ArrayList works internally in java
|
List
Be the first to comment!
JavaCollections – ArrayList
ArrayList internally
uses array data structure and ArrayList is resizable and growable array in nature
which implements the List interface... read more.....
Types of iterator In collections
Ashok Veer | April 19, 2020 |
Enhanced for loop
|
forEach
|
iterator
|
java 8 iterator
|
Type of iterator In collections
Be the first to comment!
Types of iterator In collections
In Java programming
language for fetching element one by one from the group of element there are 4
iterator are available which can iterate array, all collection, Map. So
iteration is the basic operation which is required in almost every java
project.
read more........
Collections in Java
Ashok Veer | April 18, 2020 |
collections
|
iteration in collection
|
Java
|
types of collections in java
Be the first to comment!

Java Collections
Collection means
collecting the different data objects in single unit is called collection.
In Java collection
framework provided in the java.util package
which is introduced in the JDK 1.2 versions.....read...
Subscribe to:
Posts (Atom)