Java Notes

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

--What are the difference between hashmap and hashtable?

hashtable is sync'ed so it works proper on multi thread.


hasmap accepts null on value and key
--What is dependency Injection?
For a modular structure, class calls different classes method and this makes
dependancy.
In Java, before we can use methods of other classes, we first need to create
the object of that class (i.e. class A needs to create an instance of class B). So,
transferring the task of creating the object to someone else and directly using the
dependency is called dependency injection.
constructor injection: the dependencies are provided through a class
constructor.
setter injection: the client exposes a setter method that the injector
uses to inject the dependency.
interface injection: the dependency provides an injector method that
will inject the dependency into any client passed to it. Clients must implement an
interface that exposes a setter method that accepts the dependency.
??--what is functional interface?
One of the main benefits of the function interface is that it allows you to
write code that is more concise and expressive. By defining functions as values and
passing them around as arguments or return values, developers can create more
modular and reusable code.

--What are the difference between spring and spring MVC?


spring >>Spring Framework is a comprehensive framework that provides support
for developing Java enterprise applications.
spring MVC >> web applications, powerful request mapping, data binding,
validation, and handling of different types of responses (HTML, JSON, XML, etc.).
What is Encapsulation?
Encapsulation in Java refers to integrating data (variables) and code
(methods) into a single unit(class). In encapsulation, a class's variables are
**hidden** from other classes and can only be accessed by the methods of the class
in which they are found
This unit controls the access to the data, meaning that the internal state of
an object can only be modified by its own methods.
--What is abstraction?
Abstraction, in the context of OOP, refers to the ability to hide complex
implementation details and show only the necessary features of an object. This
simplifies the interaction with objects, making programming more intuitive and
efficient
?what is @profile annotation?
The @Profile annotation in Spring is utilized to resolve the challenge of
controlling which parts of our application should be active under a particular set
of conditions or environments. It is instrumental in developing environment-
specific beans, thus making the configuration process more dynamic and flexible.
https://medium.com/@AlexanderObregon/exploring-the-use-of-profile-annotation-
in-spring-framework-32cf9fff60f2#:~:text=The%20%40Profile%20annotation%20was
%20introduced,to%20customize%20the%20application%20context.
Explain Lambda
A lambda expression is a short block of code which takes in parameters and
returns a value. Lambda expressions are similar to methods, but they do not need a
name and they can be implemented right in the body of a method.
Explain Constructor.
A constructor in Java Programming is a block of code that initializes
(constructs) the state and value during object creation. It is called every time an
object with the help of a new () keyword is created. Even if you haven't specified
any constructor in the code, the Java compiler calls a default constructor
Explain string buffer
String buffers are safe for use by multiple threads.
A string buffer is like a String , but can be modified.
Explain Core Java
Java is generally used for developing a variety of applications and applets.
Core Java is typically used for developing server-based and website applications.
Java is a superset of Core Java. Core Java is a subset of the Java language
Explain Multi threading
Multithreading in Java is an act of executing a complex process using virtual
processing entities independent of each other. These entities are called threads.
Threads in Java are virtual and share the same memory location of the process. As
the threads are virtual, they exhibit a safer way of executing a process.
Explain Hibernate
Hibernate is java based ORM tool that provides framework for mapping
application domain objects to the relational database tables and vice versa. Some
of the benefits of using Hibernate as ORM tool are: Hibernate supports mapping of
java classes to database tables and vice versa.
Explain Web Services(SOAP/REST).
Explain Object Oriented Design.
Explain Design Patterns.
Explain SQL/My SQL.

Array list
Good knowledge of java programming language with Core Java and Advance Java
Strong knowledge of Lambda/ Encapsulation/Constructor/ string buffer/#MAP and
#table.
Hands on server side development experience using Core Java/ Multi threading /
Spring/Hibernate/Web Services(SOAP/REST)/ Cloud Technologies (AWS OR Azure)/
Webservices.
Strong experience in Object Oriented Design and applying various Design Patterns.
Familiarity with basics of relational databases and SQL/My SQL

You might also like