Log4j Interview Questions and Answers

What is log4j? Log4j is a simple, flexible and fast java based logging framework. It is thread safe and supports internationalization. See more at: Log4j overview. What are the components of log4j? 1. Logger: It is used to log the messages. 2. Appender: It is used to publish the logging information to the destination like … Read more

JUnit Interview Questions and Answers

What is Testing? Testing is the process of checking an application that it is working as expected. Working as expected means for a known input it must give the expected output. In other words testing is a process of verification and validation. See more at: Junit overview. What is Unit testing? Unit testing is the … Read more

Generics Interview Questions and Answers

What is Generics in Java? Generics is a way of implementing generic programming. Generic programming provides the facility like for a set of related methods, declare a single method that support any valid types. Generics are introduced in java 5. In java, generics are added because of Compile time type safety. See more at: Generics … Read more

Quartz scheduler Interview Questions and Answers

What is Quartz? Quartz scheduler: Quartz is an open source job scheduling framework that can be integrated into a wide variety of Java applications. Where to use quartz scheduler? If our application have tasks to run on a predefine date and time then quartz scheduler is the ideal solution. See more at: JavaMail API architecture. … Read more

SQL Interview Questions and Answers

What is DBMS? DBMS refers to the Database Management System. It is a set of programs that enables you to store, modify, and retrieve the data from a database. See more at: Database overview. What is RDBMS? RDBMS refers to the Relational Database Management System. It is a database management system that is based on … Read more

JDBC Interview Questions and Answers

What is JDBC? JDBC refers to the Java Database Connectivity. It provides java API that allows Java programs to access database management systems (relational database). The JDBC API consists of a set of interfaces and classes which enables java programs to execute SQL statements. Interfaces and classes in JDBC API are written in java. See … Read more

Javamail api Interview Questions and Answers

Explain JavaMail? Email: Electronic mail refers to the method of exchanging digital messages from an author to one or more recipients over communications networks. JavaMail API: The JavaMail API provides a platform-independent and protocol-independent framework to for reading, composing, and sending emails. See more at: JavaMail API Overview. What is POP? POP is an acronym … Read more

Hibernate interview questions and answers

What is ORM? ORM refers to the Object-Relational Mapping. It is a programming technique for converting data between incompatible type systems like relational databases and object oriented programming languages like java. See more at: ORM overview. What is hibernate? Hibernate framework is an object-relational mapping library for the Java language. It is an open source … Read more

merge vs update Hibernate

Update and Merge both work on detached instances, ie instances which have a corresponding entry in the database but which are currently not attached to a Session. Both methods are used to convert these object into persistence state from detached state. The update tries to reattach the instance, that means that there may be no … Read more

save vs update vs saveorupdate Hibernate

Save: Save Serializable save(Object object) throws HibernateException   Serializable save(String entityName, Object object) throws HibernateExceptionSerializable save(Object object) throws HibernateException Serializable save(String entityName, Object object) throws HibernateException Save method is used to store an object into the database. It insert an entry if the identifier doesn’t exist. It will throw error if the identifier already exist. … Read more