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 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.
In this round, the interviewer first started asking me questions around Java and Java 8 and then he switched to OOPS and SQL.
What are Java 8 streams?
A stream is an abstraction to express data processing queries in a declarative way.
A Stream, which represents a sequence of data objects & series of operations on that data is a data pipeline that is not related to Java I/O Streams does not hold any data permanently.
The key interface is "java.util.stream.Stream". It accepts Functional Interfaces so that lambdas can be passed. Streams support a fluent interface or chaining.
What are the features of a lambda expression?
Below are the two significant features of the methods that are defined as the lambda expressions:
1) Lambda expressions can be passed as a parameter to another method.
2) Lambda expressions can be standalone without belonging to any class.
Difference between Abstract class and Interface.
Answer :
The differences between Abstract Class and Interface are as follows:
Abstract Class:
1) Abstract classes have a default constructor and it is called whenever the concrete subclass is instantiated.
2) It contains Abstract methods as well as Non-Abstract methods.
3) The class which extends the Abstract class shouldn’t require the implementation of all the methods, only Abstract
methods need to be implemented in the concrete sub-class.
4) Abstract class contains instance variables.
Interface:
1 )It doesn’t have any constructor and couldn’t be instantiated.
2) The abstract method alone should be declared.
3) Classes that implement the interface should provide the implementation for all the methods.
4) The interface contains only constants.
What do you mean by data encapsulation?
1) Data Encapsulation is an Object-Oriented Programming concept of hiding the data attributes and their behaviors in a single unit.
2) It helps developers to follow modularity while developing software by ensuring that each object is independent of other objects by having its own methods, attributes, and functionalities.
3) It is used for the security of the private properties of an object and hence serves the purpose of data hiding.
Explain the use of final keyword in variable, method and class.
In Java, the final keyword is used as defining something as constant /final and represents the non-access modifier.
1) final variable :
i) When a variable is declared as final in Java, the value can’t be modified once it has been assigned.
ii) If any value has not been assigned to that variable, then it can be assigned only by the constructor of the class.
2) final method :
i) A method declared as final cannot be overridden by its children's classes.
ii) A constructor cannot be marked as final because whenever a class is inherited, the constructors are not inherited. Hence, marking it final doesn't make sense. Java throws compilation error saying - modifier final not allowed here
3) final class :
i) No classes can be inherited from the class declared as final. But that final class can extend other classes for its usage.
Can the static methods be overridden?
1) No. Declaration of static methods having the same signature can be done in the subclass but run time polymorphism can not take place in such cases.
2) Overriding or dynamic polymorphism occurs during the runtime, but the static methods are loaded and looked up at the compile time statically. Hence, these methods cant be overridden.
What is the difference between CHAR and VARCHAR2 datatype in SQL?
Both of these data types are used for characters, but varchar2 is used for character strings of variable length, whereas char is used for character strings of fixed length. For example, if we specify the type as char(5) then we will not be allowed to store a string of any other length in this variable, but if we specify the type of this variable as varchar2(5) then we will be allowed to store strings of variable length. We can store a string of length 3 or 4 or 2 in this variable.
What is the view in SQL?
Views in SQL are a kind of virtual table. A view also has rows and columns as they are on a real table in the database. We can create a view by selecting fields from one or more tables present in the database. A View can either have all the rows of a table or specific rows based on certain conditions.
The CREATE VIEW statement of SQL is used for creating views.
Basic Syntax :
CREATE VIEW view_name AS
SELECT column1, column2.....
FROM table_name
WHERE condition;
view_name: Name for the View
table_name: Name of the table
condition: Condition to select rows
In this round, the interviewer asked me questions around BDD Frameworks, Cucumber and C#. At the end, I was also asked some basic questions revolving around SQL.
Explain briefly how Behavioral Driven Development works?
There are majorly three steps in the working of BDD. They are as follows :-
1) Behaviour Description : We list down the features of our application first in the feature file.
2) Making the Step Definition file : The mapping between each step of the scenario defined in the feature file and a
code of the function to be executed is stored in the steps definition file.
3) Testing and running : We run the test cases to check if we pass. In general, a lot of failures are observed before
achieving the final code.
What are annotations in Cucumber?
An annotation is a type of text that has been pre-defined and has a specified meaning. It tells the compiler/interpreter
what to do when the program runs. The annotations on Cucumber are as follows:
1) Given : It specifies the requirements for running the test.
Example : Given I have an account on Interviewbit.
2) When : It establishes the starting point for any test scenario.
Example : When I log in to Interviewbit.
3) Then : It contains the expected result of the test which is to be executed.
Example : Then registration should be successful.
4) And : Between any two statements, it gives the logical AND condition. AND can be combined with the GIVEN,
WHEN, and THEN statements.
Example : When I enter my account number AND CVV.
5) But : It denotes a logical OR relationship between two propositions. OR can be combined with the GIVEN, WHEN,
and THEN statements.
Example : Then I should be logged in BUT I must enter the OTP.
How can you run a selected test from a group of tests in Cucumber?
1) We may execute a single test from a set of tests in the Cucumber framework using the tags idea.
2) This is found in the TestRunner file's @CucumberOptions section. With the use of the @t keyword, we may tag a scenario in the feature file.
3) A scenario can have one or more tags within the feature file. We can separate test scenarios with the assistance of tagging.
4) We must pass the value within the tags argument to execute a selected test in Cucumber, and we must pass the <~tagname> value within the tags parameter to exclude a test from running.
What is the difference between an Array and ArrayList in C#?
An array is a collection of similar variables clubbed together under one common name. While ArrayList is a collection of objects that can be indexed individually. With ArrayList you can access a number of features like dynamic memory allocation, adding, searching, and sorting items in the ArrayList.
1) When declaring an array the size of the items is fixed therefore, the memory allocation is fixed. But with ArrayList, it can be increased or decreased dynamically.
2) Array belongs to system.array namespace while ArrayList belongs to the system.collection namespace.
3) All items in an array are of the same datatype while all the items in an ArrayList can be of the same or different data types.
4) While arrays cannot accept null, ArrayList can accept null values.
What is Reflection in C#?
Reflection in C# extracts metadata from the datatypes during runtime.
To add reflection in the .NET framework, simply use System.Refelction namespace in your program to retrieve the type which can be anything from :
1) Assembly
2) Module
3) Enum
4) MethodInfo
5) ConstructorInfo
6) MemberInfo
7) ParameterInfo
8) Type
9) FieldInfo
10) EventInfo
11) PropertyInfo
Second Highest Salary
Approach : Sort the distinct salary in descend order and then utilize the LIMIT clause to get the second highest salary.
Query :
SELECT DISTINCT Salary
FROM Employee
ORDER BY Salary DESC
LIMIT 1 OFFSET 1;
What is an ALIAS command?
Aliases are the temporary names given to a table or column for the purpose of a particular SQL query. It is used when the name of a column or table is used other than their original name, but the modified name is only temporary.
1) Aliases are created to make table or column names more readable.
2) The renaming is just a temporary change and the table name does not change in the original database.
3) Aliases are useful when table or column names are big or not very readable.
4) These are preferred when there isthe more than one table involved in a query.
This was a Technical Cum HR round where I was first asked some basic Java related concepts and then we discussed
about my expectations from the company , learnings and growth in the forthcomig years. I would suggest be honest and
try to communicate your thoughts properly in these type of rounds to maximise your chances of getting selected.
Why should we hire you ?
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.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical
questions. No coding in most of the cases but some discussions over the design can surely happen.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?