Robosoft Technologies
Anchanto Interview Questions and Answers
Q1. What is the use of static keyword?
Static keyword is used to create class-level variables and methods that can be accessed without creating an instance of the class.
Static variables are shared among all instances of a class
Static methods can be called without creating an object of the class
Static blocks are used to initialize static variables
Static import is used to import static members of a class
Q2. Difference between abstract class and interface
Abstract class can have implementation while interface only has method signatures.
Abstract class can have constructors while interface cannot.
A class can implement multiple interfaces but can only extend one abstract class.
Abstract classes can have non-abstract methods while interfaces cannot.
Abstract classes can have instance variables while interfaces cannot.
Interfaces can have default methods while abstract classes cannot.
Q3. What the use of spring boot
Spring Boot is a framework for building standalone, production-grade Spring-based applications.
Simplifies the process of creating and deploying Spring-based applications
Provides a range of pre-configured features and dependencies
Enables rapid development and prototyping
Supports a variety of deployment options, including cloud-based platforms
Offers a range of plugins and tools for development and testing
Improves developer productivity and reduces time-to-market
Q4. Difference between list and set
List is an ordered collection while Set is an unordered collection of unique elements.
List allows duplicate elements while Set does not.
List maintains the insertion order while Set does not guarantee any order.
List is implemented using ArrayList, LinkedList, etc. while Set is implemented using HashSet, TreeSet, etc.
List has methods like get(), set(), add(), remove(), etc. while Set has methods like add(), remove(), contains(), etc.
Q5. What is generics?
Generics is a feature in Java that allows classes and methods to be parameterized by type.
Generics provide type safety and reduce code duplication.
They allow for the creation of reusable code.
Example: List
myList = new ArrayList (); Example: public class MyClass
{ ... } Example: public
void myMethod(T t) { ... }
Q6. Indexing in SQL?
Indexing in SQL is a technique to improve query performance by creating indexes on columns.
Indexes are created on columns that are frequently used in WHERE, JOIN, and ORDER BY clauses.
Indexes can be created using CREATE INDEX statement.
Indexes can be unique or non-unique.
Indexes can be clustered or non-clustered.
Indexes can be dropped using DROP INDEX statement.
Q7. Joins in sql
Joins are used in SQL to combine data from two or more tables based on a related column between them.
Types of joins include inner join, left join, right join, and full outer join
Inner join returns only the matching rows from both tables
Left join returns all rows from the left table and matching rows from the right table
Right join returns all rows from the right table and matching rows from the left table
Full outer join returns all rows from both tables, with NULL values for n...read more
Top Java Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month