Posts

Showing posts from February, 2021

Multithreading at a Glance - Part 1

Image
  H ello Techie's, How are you all? Hope you are doing well in life. My name is " Sumit Srivastava " and I am MCA passout of 2019 batch. I have taken Multithreading as today's topic. So, let's go. Multi-threading Guy's before moving to Multithreading , first we should know about what the Thread is? A Thread is a lightweight sub-process . It a a smallest part of process which allows to operate any task in a efficient way without interacting to any other thread. It means a thread is independent in nature. Thread We can create a thread in two ways:- 1. by extending Thread class 2. by implementing Runnable Interface. Ex.1   By extending Thread class - public class Test extends Thread{          public void run(){                    System.out.println("Thread are in run method by extending thread class");          } } Ex.2 By implementing Runnable Interface - public class Test im...

Lambda Expression in JAVA--Part 1

Image
Hey, hello folks. How's the thing is going? Hope you guy's are doing well in your life,if not then don't worry all will be good soon. So my name is " Sumit Srivastava " and I am MCA passout of 2019 batch.  This is my first ever Technical Blog which i am writting to share some concept learnings on JAVA. So today i am taking a very important feature of JAVA 8. Here we go. Lambda Expression What is Lambda Expression? It is one of the most important feature of java which is introduced in Java SE8. It is used to provide a short and clear way to represent one method interface by using expression. Its a block of code similar to function. Syntax: parameter -> expression Java lambda expression syntax consisted of three components:- Argument-list (It can be empty/non-empty) Arrow-token (It is basically act as a bridge between Argument list and expression) Body ( We write expressions, statements, for lambda expression,gives implementation of functional interface) Lambda E...