LinkedBlockingDeque in Java

LinkedBlockingDeque in Java is an implementation of BlockingDeque interface and is part of java.util.concurrent package. LinkedBlockingDeque, just like LinkedBlockingQueue, is an optionally-bounded blocking queue which means the capacity for the queue can be specified thus making it bounded or it can be left unspecified in which case capacity of the…

Continue reading

How to Convert double to String in Java

This post shows how you can convert double to String in Java. Converting double to String using Double.toString() method Wrapper class Double in Java has a toString() method that returns a string representation of the passed double argument which can be used to convert double to String in Java.

Continue reading

How to Convert float to String in Java

This post shows how you can convert float to String in Java. Converting float to String using Float.toString() method Wrapper class Float in Java has a toString() method that returns a string representation of the passed float argument.

Output

Convert using String.valueOf() method String.valueOf(float f)– Returns the string…

Continue reading

Marker Interface in Java

Marker interface in Java is an interface with empty body. A marker interface does not contain constants or methods, examples of marker interface in Java are- java.util.RandomAccess java.rmi.Remote java.io.Serializable java.lang.Cloneable Marker interface adds special behavior Since marker interface is an empty interface so there are no methods to implement. It…

Continue reading