what is javac?

The javac is the primary Java compiler included in the Java Development Kit (JDK). It converts the java source code into byte code.  

What all memory areas are allocated by JVM?

Being an abstract machine, JVM (Java Virtual Machine) as a program/software takes Java bytecode and converts the byte code (line by line) into machine understandable code. To run Java applications, it acts as a run-time engine. Along with being a part of the JRE(Java Runtime Environment), JVM is also the one that calls for the … Read more

how to create immutable map in java?

The java.util.Collections class consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, “wrappers”, which return a new collection backed by a specified collection, and a few other odds and ends. Collections.unmodifiableMap() method is used to create immutable set in java. It will throws an exception … Read more

how to create immutable set in java?

The java.util.Collections class consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, “wrappers”, which return a new collection backed by a specified collection, and a few other odds and ends. Collections.unmodifiableSet() method is used to create immutable set in java. It will throws an exception … Read more

how to create immutable list in java?

The java.util.Collections class consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, “wrappers”, which return a new collection backed by a specified collection, and a few other odds and ends. Collections.unmodifiableList() method is used to create immutable list in java. It will throws an exception … Read more

How to create synchronized map?

The java.util.Collections class consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, “wrappers”, which return a new collection backed by a specified collection, and a few other odds and ends. Collections.synchronizedMap() method will returns a synchronized (thread-safe) map backed by the specified map. In order … Read more

How to create synchronized set?

The java.util.Collections class consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, “wrappers”, which return a new collection backed by a specified collection, and a few other odds and ends. Collections.synchronizedSet() method will returns a synchronized (thread-safe) set backed by the specified set. In order … Read more

how to create synchronized list in java?

The java.util.Collections class consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, “wrappers”, which return a new collection backed by a specified collection, and a few other odds and ends. Collections.synchronizedList() method will returns a synchronized (thread-safe) list backed by the specified list. In order … Read more

how to rotate element in list java?

The java.util.Collections class consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, “wrappers”, which return a new collection backed by a specified collection, and a few other odds and ends. Collections.rotate() method will rotates the elements in the specified list by the specified distance. Syntax: … Read more