Blog Archives
1 5 6 7 8 9 10 11 12 13 28

04: Convert Lists to Maps and Maps to Lists with Java 8 power

Why convert from a list to a map? Maps allow you to store and access data by a “KEY”. Lists only allow you to access data by either index or by looping through the whole list to find a value that you are interested in. … Read more ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


04: Git Merging Vs rebasing must know interview questions and answers

Q1. What do you understand by the terms merging and rebasing? Can you explain both with a daiagram? A1. Both of these commands are designed to integrate changes from one branch into another branch—they just do it in very different ways. … Read more ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


04: How to go about designing a medium size JEE app?

A very popular open-ended question to judge your Java/JEE experience. Q. How would you go about designing a medium sized JEE application? A. Don’t start with 3-tier architecture, logical layers, Spring/Hibernate framework etc. The phases of designing any systems are: Requirements Gathering => … Read more ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


04: Java 9 to 20 features interview Q&As – Records

Q01: What is a data class?
A01: A data class refers to a class that contains only fields and methods for accessing them via getters and setters. These are simply containers for data used by other classes.

Q02: What exactly makes creating data classes in Java so tedious?

Read more ›



04: JMockit interview Q&As & examples on @Injectable vs @Mocked

This extends 01: JMockit interview Q&As on @Injectable Vs @Mocked Vs @Tested. The purpose of mocking objects is to return an expected value to test the logic of the class under test. This can be achieved with JMockit Expectations. Q1. … Read more ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


04: Kubernetes (i.e k8s) interview Q&As – Volumes, PVs, PVCs & StorageClass

Q01. What is the difference between Docker & Kubernetes Volumes? A01. Docker Volume and Kubernetes Persistent Volume serve similar purposes, but they differ in a number of ways. a) Docker Volumes are used in Docker environments, … Read more ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


04: Microservices Architecture design patterns & considerations interview Q&As – Part 3

This extends 03: Microservices Architecture design patterns & considerations interview Q&As – Part 2. 4. Cross-cutting concern patterns Microservices require various cross-cutting concerns such as metrics, reporting exceptions to an exception tracker, logging, distributed tracing, health checks, externalized configuration, and security. Additionally, a service may need to handle service discovery...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


04: Mockito interview Q&As & examples – PowerMock for mocking private & static methods

Let’s look at step by step to understand how to mock private & static methods with PowerMock & JUnit. pom.xml Step 1: The pom.xml file should have Mockito & Powermock libraries.

Config & Service classes to test Step 2: The implementation classes that need to be tested. … Read...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


04: Mockito partially mocking with @Spy

This extends Part 2: Mockito to fully mock the DAO layer by modifying the service layer to demonstrate partial mocking with “Mockito.spy”. In the “SimpleServiceImpl” we are interested in only testing the method “processUser(int id)” and want to mock the method “getUserById(int id)” by always returning “Sam”. So, … Read...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


04: Networking basics interview Q&As on OSI model

This extends Networking basics interview Q&As on Protocols. What is an OSI model? Q1. What is an OSI model? A1. The OSI model can be seen as a universal language for computer networking. It is based on the concept of splitting up a communication system into seven abstract layers as...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


04: Q18 Explain abstraction, encapsulation, Inheritance, and polymorphism with the given Java code?

Q18. Given code:

A18. Firstly, let’s take abstraction and encapsulation as the difference is subtle. Abstraction is often not possible without encapsulation because if a class exposes its internal state, it can’t change its inner workings.

Read more ›



04: Spring MVC with Thymeleaf and JavaConfigs

Project structure

pom.xml to bring-in Thymeleaf & Spring jars

Step 1: Add “Thymeleaf“jar dependency, and also override default “maven-war-plugin” by explicitly adding the”failOnMissingWebXml” to false to not have web.xml as we will be using JavaConfigs and AbstractAnnotationConfigDispatcherServletInitializer.

Read more ›



04: Tree – Get root to leaf max sum in Java example

Q. Write code to traverse a tree and get the largest “root-to-leaf sum”? A “root-to-leaf sum” is a sum of the node values in a root-to-leaf path.

A. Let’s have a basic implementation of the above Node interface. … Read more ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


1 5 6 7 8 9 10 11 12 13 28

300+ Java Interview FAQs

Tutorials on Java & Big Data