tutorial

Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Thread pool in Java


The Thread poolIntroductionExecutor implementations use thread pools.The thread pool is a collection of worker threads that are ready to serve.Creating new threads and manage them uses a big amount of data.Worker threads in the thread pool will help to reduce this overhead of creating threads.Tasks...

Java ExecutorService


Java ExecutorServiceIntroductionIf an application has few threads, it can be used threads very easily using the above methods.But if an application has many threads, it will be not easy to handle this.Executors can be used to avoid this complexity.The executor framework is a framework that can be...

Thread priority


Thread priorityEach thread has a priority.It starts from 1 to 10 and the highest priority is 10 while the lowest is 1.The default priority of the main thread is 5.If you set the thread priority out of 10, it will give a compile-time errorException in thread "main" java.lang.IllegalArgumentExcepti...

List vs Queue vs Set vs Map


 List vs Queue vs Set vs MapListQueueSetMapDuplicatesYesYesNoNo(Allow duplicate values not keys)OrderYesYesNoNoNull valuesYesPriority queue doesn't allow, but queue using LinkedList allows nullSingle nullSingle null key and many null valu...

What is REST


RESTIntroductionStands for Representational State Transfer.REST is a web standards-based architecture that uses the HTTP protocol (port 80) for data communication.Uses HTTP methods for data communication REST server simply provides access to resources and client access and presents the resource.REST...

Directives in Angular 11


 DirectivesDirectives are instructions in the DOMIt adds additional behaviors to the elementsUsing inbuilt directives we can manage forms, lists, styles, and what users see.There are a few typesComponent directivesAttribute directivesStructural directivesComponent directivesThese directives are...

Access token vs refresh token


Access token vs refresh tokenAccess tokenThis is short-livedSend API request, with the access tokenIf the access token is invalid, fail and ask the user to re-authenticateThere are few types of access tokensBearer tokensJWT tokensOpaque tokenRefresh tokenThese tokens are long-livedRefresh tokens are...

Throw vs throws in exception handling


Throw vs throwsThrowThrowsUses inside a method when it is required to throw an exceptionThis is used in the method signature in which methods that exceptions can occur. Only one exception can be thrownThrows can be used to declare multiple exceptionsUsed to handle unchecked exceptionsUsed to handle...