How to solve springboot "Cannot determine embedded database driver class for database type NONE" Exception
Java Interview Questions and Answers
by
3M ago
       I posted a last post a year ago, sorry to the users to have disconnectivity of the blog posts due to some reasons. Today we will discuss about one of the issue will face during start of spring boot application without configuring any database things.         If you are the Spring boot beginer and trying to run the application without configuring the datasource in your application then you can get below exception, *************************** APPLICATION FAILED TO START *************************** Description: Cannot determine embedded database ..read more
Visit website
Spring Stereotype Annotations
Java Interview Questions and Answers
by
1y ago
    In this post, we can learn what are the Stereotype annotations in Spring and also difference between @Component and @Bean annotations. In Previous one of the post we discussed all Spring Annotations,  so stereotype annotations also covered but we need to see which are those Spring annotations are stereotype annotations.      The Stereotype annotations are special type of annotations and are used to create Spring beans automatically in the application context. The Stereotype annotations are @Component, @Controller, @Service and @Repository. @Component an ..read more
Visit website
SOLID Design Principles with Examples
Java Interview Questions and Answers
by
1y ago
       In this post, we w'll learn the SOLID Principles with example for each principle and also to learn how to use these principles in our daily basis coding.               SOLID Principles is a coding standard that all developers should follow these principles while developing any software. It was promoted by Robert C Martin and is used across the object-oriented design spectrum. When you apply SOLID principles properly in your software, it makes your code more extendable, logical, and easier to read.        &nb ..read more
Visit website
What is Effectively Final in Java 8
Java Interview Questions and Answers
by
1y ago
     In Java 8, introduced one new concept called "effectively final" variable. A variable or parameter whose value is never changed after it is initialized is effectively final.       There is no need to explicitly declare such a variable as final, although if you declare final it won't cause any issue. This effectively final variable can be used inside anonymous class or lambda expression and can not change this variable value inside anonymous class or lambda expression. Example of effectively final:- String str = "Acuver Consulting";List<String> ..read more
Visit website
Java Collection Framework Best Practices
Java Interview Questions and Answers
by
1y ago
       In this article we can discuss the best practices of java collection and sample examples for each usages. 1) Choose the right collection         This is the most important step before using any collection. Depending upon functionality or problem solve to decide the right collection to use in the code implementation. There are multiple criteria to choose right collection -  1) collection allows duplicates or not  2) accepts null or not  3) search based on index 4) Supports concurrency. and also the developer should know the perf ..read more
Visit website
Examples of anyMatch(), allMatch() and noneMatch() methods of stream API in Java
Java Interview Questions and Answers
by
2y ago
          Java 8 has many features, but stream API is one of the important feature to simplify the code. In the current post, I will give some examples of  anyMatch(), allMatch() and noneMatch. anyMatch() - any element of a stream match with predicate then will return true else false. allMatch() - all elements of a stream should match with predicate then will return true else false. noneMatch() - all elements of stream should not match with predicate then will return true else false. Example:- package com.practice;import java.util.ArrayList;import java.util ..read more
Visit website
Difference between CrudRepository and JpaRepository in Spring Data JPA
Java Interview Questions and Answers
by
2y ago
      In this post, we will see difference between CrudRepository and JpaRepository in Spring Data JPA. These two CrudRepository and JpaRepository are the interfaces of the Spring Data Core library.       The JpaRepository extends CrudRepository and it inherits some of the methods available in the CrudRepository like findOne, get and so on. And JpaRepository also extends PagingAndSorting Repository uses for Pagination and Sorting purpose.     The CrudRepository and PagingAndSortingRepository are the base interfaces of Spring Core library and it has bel ..read more
Visit website
Difference between CrudRepository and JpaRepository in Spring Data JPA
Java Interview Questions and Answers
by
2y ago
       In this post, we will see difference between CrudRepository and JpaRepository in Spring Data JPA. These two CrudRepository and JpaRepository are the interfaces of the Spring Data Core library.       The JpaRepository extends CrudRepository and it inherits some of the methods available in the CrudRepository like findOne, get and so on. And JpaRepository also extends PagingAndSorting Repository uses for Pagination and Sorting purpose.     The CrudRepository and PagingAndSorting Repository are the base interfaces of Spring Core library and it ..read more
Visit website
Difference between openSession and getCurrentSession methods in Hibernate
Java Interview Questions and Answers
by
3y ago
         As we know that there are two ways to create/get session in Hibernate. There are two methods openSession() and getCurrentSession() methods to create/get session object from SessionFactory class. The openSession() method always creates new session each time but getCurrentSession() method of sessionFactory returns the session object from context, if session is not present in the context then will create new session object. We can see few more differences as below, openSession():- It will create new Session object each time when you call openSession() method ..read more
Visit website
Difference between fail-safe and fail-fast iterator in Java
Java Interview Questions and Answers
by
3y ago
        In the current interview topic, we will discuss the difference between fail safe and fail fast iterators in Java. Basically this question is related to ConcurrentModificationException, means what are the scenario to throw this exception. The above iterator one it will throw exception and another one doesn't throw, this is the main difference. We can discuss few more differences and with examples as follows Related topic - Difference between HashSet and TreeSet in Java Difference between fail-fast and fail-safe iterator:- Difference between fail-fast and fail-safe iterator Example of ..read more
Visit website

Follow Java Interview Questions and Answers on Feedspot

Continue with Google
OR