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 round consisted of 1 question from DSA and the rest of them were related to Java and API Testing.



1. Trailing zeros in a number can be defined as the number of continuous suffix zeros starting from the zeroth place of a number.
2. For example, if a number X = 1009000, then the number of trailing zeros = 3 where the zeroth place is 0, the tenth place is 0, the hundredth place is 0.
3. ! means “FACTORIAL”. Factorial of a number is calculated by the product of the integer and all integers below it till 1.
4. Value of 0! is 1.
Approach :
1) Calculate the factorial of N.
2) Initialise FACT = 1 to store factorial of N, iterate 1 <= i <= N and do FACT = FACT * i.
3) Count the number of trailing zeroes in FACT. Initialise ZEROES = 0.
4) Repeatedly divide the FACT by 10, if the remainder is 0, increase ZEROES by 1. If the remainder > 0, stop and return ZEROES.
TC : O(N) , where N is the given number
SC : O(1)
How would you differentiate between a String, StringBuffer, and a StringBuilder?
1) Storage area: In string, the String pool serves as the storage area. For StringBuilder and StringBuffer, heap memory is the storage area.
2) Mutability: A String is immutable, whereas both the StringBuilder and StringBuffer are mutable.
3) Efficiency: It is quite slow to work with a String. However, StringBuilder is the fastest in performing operations. The speed of a StringBuffer is more than a String and less than a StringBuilder. (For example appending a character is fastest in StringBuilder and very slow in String because a new memory is required for the new String with appended character.)
4) Thread-safe: In the case of a threaded environment, StringBuilder and StringBuffer are used whereas a String is not used. However, StringBuilder is suitable for an environment with a single thread, and a StringBuffer is suitable for multiple threads.
What is classloader?
Classloader is a subsystem of JVM which is used to load class files. Whenever we run the java program, it is loaded first by the classloader. There are three built-in classloaders in Java.
1) Bootstrap ClassLoader: This is the first classloader which is the superclass of Extension classloader. It loads the rt.jar file which contains all class files of Java Standard Edition like java.lang package classes, java.net package classes, java.util package classes, java.io package classes, java.sql package classes, etc.
2) Extension ClassLoader: This is the child classloader of Bootstrap and parent classloader of System classloader. It loads the jar files located inside $JAVA_HOME/jre/lib/ext directory.
3) System/Application ClassLoader: This is the child classloader of Extension classloader. It loads the class files from the classpath. By default, the classpath is set to the current directory. You can change the classpath using "-cp" or "-classpath" switch. It is also known as Application classloader.
Why are Java Strings immutable in nature?
String objects in Java are immutable by definition. This signifies that the String object's state cannot be changed once it has been created. As a result, if you try to update the value of that object rather than the values of that object, Java creates a new string object.
Because String objects are often cached in the String pool, Java String objects are immutable. Because String literals are frequently shared among numerous clients, one client's action may have an impact on the others. It improves the application's security, caching, synchronization, and performance by doing so.
What is Latency in API testing?
Latency refers to the response time or the delay taken by the request to reach the server. We need to ensure that the latency involved in reaching the server is minimum as higher the latency, greater is the impact in the application’s speed and performance.
Standard OS questions related to Java were asked in this round followed by some questions from Selenium and JUnit.
Explain the Life Cycle of a Thread in Java .
In Java, a thread always exists in any one of the following states. These states are:
1) New
2) Active
3) Blocked / Waiting
4) Timed Waiting
5) Terminated
Explanation of Different Thread States :
1) New: Whenever a new thread is created, it is always in the new state. For a thread in the new state, the code has not been run yet and thus has not begun its execution.
2) Active: When a thread invokes the start() method, it moves from the new state to the active state. The active state contains two states within it: one is runnable, and the other is running.
2.1) Runnable: A thread, that is ready to run is then moved to the runnable state. In the runnable state, the thread may be running or may be ready to run at any given instant of time. It is the duty of the thread scheduler to provide the thread time to run, i.e., moving the thread the running state.
2.2) Running: When the thread gets the CPU, it moves from the runnable to the running state. Generally, the most common change in the state of a thread is from runnable to running and again back to runnable.
3) Blocked or Waiting: Whenever a thread is inactive for a span of time (not permanently) then, either the thread is in the blocked state or is in the waiting state.
For example, a thread (let's say its name is A) may want to print some data from the printer. However, at the same time, the other thread (let's say its name is B) is using the printer to print some data. Therefore, thread A has to wait for thread B to use the printer. Thus, thread A is in the blocked state.
4) Timed Waiting: Sometimes, waiting for leads to starvation. For example, a thread (its name is A) has entered the critical section of a code and is not willing to leave that critical section. In such a scenario, another thread (its name is
B) has to wait forever, which leads to starvation. To avoid such scenario, a timed waiting state is given to thread B. Thus, thread lies in the waiting state for a specific span of time, and not forever.
5) Terminated: A thread reaches the termination state because of the following reasons:
i) When a thread has finished its job, then it exists or terminates normally.
ii) Abnormal termination: It occurs when some unusual events such as an unhandled exception or
segmentation fault.
A terminated thread means the thread is no more in the system. In other words, the thread is dead, and there is no way one can respawn (active after kill) the dead thread.
Why Java is platform independent and JVM platform dependent?
JVM is platform dependent because it takes java byte code and generates byte code for the current operating system. So Java software is platform dependent but Java language is platform independent because different operating system have different JVMs.
What are Junit annotations?
Junit is a unit testing framework introduced by Apache. Junit is based on Java.
Following are the JUnit Annotations:
@Test: Annotation lets the system know that the method annotated as @Test is a test method. There can be multiple test methods in a single test script.
@Before: Method annotated as @Before lets the system know that this method shall be executed every time before each of the test methods.
@After: Method annotated as @After lets the system know that this method shall be executed every time after each of the test method.
@BeforeClass: Method annotated as @BeforeClass lets the system know that this method shall be executed once before any of the test methods.
@AfterClass: Method annotated as @AfterClass lets the system know that this method shall be executed once after any of the test methods.
@Ignore: Method annotated as @Ignore lets the system know that this method shall not be executed.
What are the limitations of Selenium?
Following are the limitations of Selenium:
1) Selenium supports testing of only web-based applications
2) Mobile applications cannot be tested using Selenium
3) Captcha and Barcode readers cannot be tested using Selenium
4) Reports can only be generated using third-party tools like TestNG or JUnit.
5) As Selenium is a free tool, thus there is no ready vendor support through the user can find numerous helping communities.
6) The user is expected to possess prior programming language knowledge.
Explain the various navigation commands supported by Selenium.
Selenium has the support of majorly 4 navigation commands:
1) navigate().back(): This command is used for taking the user to the last webpage of the browser history.
2) navigate().forward(): This command is used for taking the user to the next web page of the browser history.
3) navigate().refresh(): This command is used for reloading the web components of a webpage by refreshing it.
4) navigate().to(): This command is used for navigating to a particular URL in a new web browser. It takes the URL to be migrated to, as a parameter.
This was a typical HR round with some standard Behavioral questions .
Tell me something not there in your resume.
If you get this question, it's an opportunity to choose the most compelling information to share that is not obvious from your resume.
Example :
Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me unique from others.
Ability to handle Pressure -> I enjoy working under pressure because I believe it helps me grow and become more efficient.
Tip : Emphasize why you were inspired to apply for the job. You can also explain that you are willing to invest a great deal of energy if hired.
These are generally very open ended questions and are asked to test how quick wit a candidate is. So there is nothing to worry about if you have a good cammand over your communication skills and you are able to propagate your thoughts well to the interviewer.

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?