Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
This was a technical round where technical core concepts were tested.
What are the features of Java8?
Java 8 provides following features for Java Programming:
Lambda expressions : Lambda expression helps us to write our code in functional style. It provides a clear and concise way to implement SAM interface(Single Abstract Method) by using an expression. It is very useful in collection library in which it helps to iterate, filter and extract data.
Method references : Java 8 Method reference is used to refer method of functional interface . It is compact and easy form of lambda expression. Each time when you are using lambda expression to just referring a method, you can replace your lambda expression with method reference.
Functional interfaces : An Interface that contains only one abstract method is known as functional interface. It can have any number of default and static methods. It can also declare methods of object class. Functional interfaces are also known as Single Abstract Method Interfaces (SAM Interfaces).
Stream API : Java 8 java.util.stream package consists of classes, interfaces and an enum to allow functional-style operations on the elements. It performs lazy computation. So, it executes only when it requires.
Default methods : Java provides a facility to create default methods inside the interface. Methods which are defined inside the interface and tagged with default keyword are known as default methods. These methods are non-abstract methods and can have method body.
Base64 Encode Decode : Java provides a class Base64 to deal with encryption and decryption. You need to import java.util.Base64 class in your source file to use its methods.This class provides three different encoders and decoders to encrypt information at each level.
Different types of hashmaps in Java
1. HashMap: HashMap offers 0(1) lookup and insertion. If you iterate through the keys, though, the ordering of the keys is essentially arbitrary. It is implemented by an array of linked lists.
Syntax:
public class HashMap extends AbstractMap
implements Map,Cloneable, Serializable
2.LinkedHashMap: LinkedHashMap offers 0(1) lookup and insertion. Keys are ordered by their insertion order. It is implemented by doubly-linked buckets.
Syntax:
public class LinkedHashMap extends HashMap
implements Map
3.TreeMap: TreeMap offers O(log N) lookup and insertion. Keys are ordered, so if you need to iterate through the keys in sorted order, you can. This means that keys must implement the Comparable interface. TreeMap is implemented by a Red-Black Tree.
Syntax:
public class TreeMap extends AbstractMap implements
NavigableMap, Cloneable, Serializable
Difference between StringBuffer and StringBuilder
1. StringBuffer is present in Java. StringBuilder was introduced in Java 5.
2. StringBuffer is synchronized. This means that multiple threads cannot call the methods of StringBuffer simultaneously. StringBuilder is asynchronized. This means that multiple threads can call the methods of StringBuilder simultaneously.
3. Due to synchronization, StringBuffer is called a thread safe class. Due to its asynchronous nature, StringBuilder is not a thread safe class.
4. Due to synchronization, StringBuffer is lot slower than StringBuilder. Since there is no preliminary check for multiple threads, StringBuilder is a lot faster than StringBuffer.
This round was a discussion with the project manager , so its also technical along with previous project. Also, future project related questions to check candidate suitable or not
How is memory allocated for a string?
Java Strings are immutable objects. In a way each time you create a String, there will be char[] memory allocated with number of chars in String. If you do any manipulations on that String it will be brand new object and with the length of chars there will be memory allocation done.
What is the difference between intermediate and terminal operations on Stream?
The intermediate Stream operation returns another Stream, which means you can further call other methods of Stream class to compose a pipeline. For example after calling map() or flatMap() you can still call filter() method on Stream.
On the other hand, the terminal operation produces a result other than Streams like a value or a Collection.
Once a terminal method like forEach() or collect() is called, you cannot call any other method of Stream or reuse the Stream.
Internal Working of Hash Map in Java
HashMap uses its static inner class Node for storing map entries. That means each entry in hashMap is a Node. Internally HashMap uses a hashCode of the key Object and this hashCode is further used by the hash function to find the index of the bucket where the new entry can be added.
HashMap uses multiple buckets and each bucket points to a Singly Linked List where the entries (nodes) are stored.
Once the bucket is identified by the hash function using hashcode, then hashCode is used to check if there is already a key with the same hashCode or not in the bucket(singly linked list).
If there already exists a key with the same hashCode, then the equals() method is used on the keys. If the equals method returns true, that means there is already a node with the same key and hence the value against that key is overwritten in the entry(node), otherwise, a new node is created and added to this Singly Linked List of that bucket.
If there is no key with the same hashCode in the bucket found by the hash function then the new Node is added into the bucket found.
Typical HR round with behavioral problems.
Q1. He asked for an end to end explanation of my last project.
Q2. Why do you want to join Larsen & Toubro Infotech?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?