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 with questions on Java.
What are the features of Java 8?
Java 8 provides following features for Java Programming :
1. 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.
2. 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).
3. Java introduced a new class Optional in Java 8. It is a public final class which is used to deal with NullPointerException in Java application. We must import java.util package to use this class. It provides methods to check the presence of value for particular variable.
4. Java has introduced a new Date and Time API since Java 8. The java.time package contains Java 8 Date and Time classes.
5. 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.
What is a string?
A Java string is a sequence of characters that exist as an object of the class java.lang. Java strings are created and manipulated through the string class. Once created, a string is immutable -- its value cannot be changed.
Methods of class String enable :
Examining individual characters in the string.
Comparing strings.
Searching strings.
Copying strings with characters converted from upper to lower case or vice versa.
Explain the concept of threads.
Threads allows a program to operate more efficiently by doing multiple things at the same time. Threads can be used to perform complicated tasks in the background without interrupting the main program.
There are two ways to create a thread. It can be created by extending the Thread class and overriding its run() method :
1. Extend Syntax
public class Main extends Thread {
public void run() {
System.out.println("This code is running in a thread");
}
}
2. Another way to create a thread is to implement the Runnable interface :
Implement Syntax
public class Main implements Runnable {
public void run() {
System.out.println("This code is running in a thread");
}
}
Explain call by value.
Call by Value means calling a method with a parameter as value. Through this, the argument value is passed to the parameter. In call by value, the modification done to the parameter passed does not reflect in the caller's scope.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is 3 + 2 * 4 based on operator precedence?