Himanshu shriv has Published 52 Articles

Difference between Apache Kafka and JMS.

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 11:47:03

717 Views

Kafka and JMS both are messaging system. Java message service is an api which are provided by Java. It is used for implementing messaging system in your application. JMS supports queue and publisher /subscriber(topic) messaging system . With queues, when first consumer consumes a message, message gets deleted from the ... Read More

Difference between Point-To-Point and Publish/Subscribe JMS Messaging Models

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 11:44:58

622 Views

JMS is an acronym Java message service. Java message service is an api which are provided by Java. It is used for implementing messaging system in your application.JMS is an API or specification which does not contain implementation therefore to use JMS have to some third party service provider like ... Read More

Difference between PermGen Space and MetaSpace.

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 11:29:52

3K+ Views

PermGen is the memory area for storing class data like static variable, byte code and etc. By default 64 Mb is allocated for PermGen. It can be tuned by using -XXMaxPermSize.In Java 8, PermGen method area replaced with MetaSpace. They have moved permGem to the separate memory in the native ... Read More

Difference between Iterator and Spilt Iterator in Java.

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 11:27:40

621 Views

Iterator and split iterator both interface are used for iterating over the collection.Split iterator is introduced in Java 8 for achieving parallelism. It can split the given set of element and can perform operation parallely using different independent threads. It can traverse the elements parallely as well as sequentially manner. ... Read More

Difference between intermediate and terminal operations in Java 8

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 11:25:15

11K+ Views

Stream is introduced in Java 8, it is only used for processing group of data not for the storting elements.. It does not modify the actual collection, they only provide the result as per the pipelined methods.Stream api supports multiple operations and operations are divided into two parts −Intermediate Operation- ... Read More

Difference between Function and Predicate in Java 8

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 11:22:33

5K+ Views

Function and Predicate both functional interface was introduced in Java 8 to implement functional programming in Java.Function interface is used to do the transformation.It can accepts one argument and produces a result. On the other side, Predicate can also accept only one argument but it can only return boolean value. ... Read More

Difference between scheduledThread pool and Single Thread Executor.

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 11:16:53

957 Views

Sr. No.KeyScheduled Thread PoolSingle Thread Executor1BasicCreates a thread pool that can schedule commands to run after a given delay, or to execute periodically. Tasks are guaranteed to execute sequentially, and no more than one task will be active at any given time2QueueIt uses Delay Queue to store tasks. Schedule the task ... Read More

Difference between Fixed thread pool and cached thread pool.

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 09:41:08

3K+ Views

Executor framework are designed using thread pool concept. Thread pool is the way to reuse the already created thread instead of creating a new thread every time to execute the current task.Executors class provides a factory method to create thread pools. The ThreadPoolExecutor class is the base implementation for the ... Read More

Difference between Executor and ExecutorServices in Java

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 09:36:46

750 Views

Executor and ExecutorServices both interfaces are part of the Executor framework. It is released with Java 5. In java, thread creation is very expensive operation so we should  reuse the available thread instead of starting a new thread every time and we can achieve the same using Executor framework.Executor framework use ... Read More

Difference between Runnable and Callable interface in java

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 09:33:21

4K+ Views

Runnable and Callable both functional interface. Classes which are implementing these interfaces are designed to be executed by another thread.Thread can be started with Ruunable and they are two ways to start a new thread: one is by subclassing Thread class and another is implementing Runnable interface.Thread class does not ... Read More

Advertisements