Category: Interview Questions
Explain what is Maven Repository? What are their types?
A Maven repository is a location where all the project jars, library jars, plugins or any other particular project related artifacts are stored and can…
What is POM in Maven?
In Maven, POM (Project Object Model) is the fundamental unit of work. It is an XML file which holds the information about the project and…
List out what are the aspects does Maven Manages?
Maven handles following activities of a developer Build Documentation Reporting Dependencies SCMs Releases Distribution Mailing list
Write JDBC steps to connect to MySQL database in Java
In order to connect to MySQL database, Follow below steps Load JDBC Driver Create Connection object (By passing url, username and password) Create statement object…
Can we call run() method of a Thread class?
Yes, we can call run() method of a Thread class but then it will behave like a normal method. To actually execute it in a…
What are different states in lifecycle of Thread?
Initially when we create a Thread in java program, its state is New. When we start the thread that changes its state from New to…
How can we create a Thread in Java?
There are two ways to create threads in Java By implementing Runnable interface By extending the Thread Class Difference between Thread and Runnable Preferred way…
What is Synchronization in Java? Explain synchronized keyword.
If multiple threads try to operate on a single Java object simultaneously, it may result in data inconsistency problem (Race Condition). Synchronization in java is…
Difference between User Thread and Daemon Thread
When we create a Thread in java program, it is known as user thread. A daemon thread runs in background and does not prevent JVM…
What is the difference between Process and Thread?
A process is a self-contained execution environment and it can be seen as a program or application whereas Thread is a single task of execution…