Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our YouTube channel to start Rocking right now!
Gain access to the industrys' best FREE video guides including:
1. Core Java guides
2. Enterprise Java guides
3. JVM insights, configuration and troubleshooting guides
4. Java performance guides
5. Java Interview Questions
and many more ....

Spring Injection Types

spring-interview-questions-answers

Spring supports three types of dependency injections: Constructor injection @Component public class SecondBeanImpl implements SecondBean { private FirstBean firstBean; @Autowired public SecondBeanImpl(FirstBean firstBean) { this.firstBean = firstBean; } } That is similar to: FirstBean firstBean = new FirstBeanImpl(); SecondBean secondBean = new SecondBeanImpl(firstBean); This type of dependency injection instantiates and initializes the object. In this approach, beans are immutable and ...

Read More »

Python join() method Tutorial

Hello in this tutorial, we will understand the join() method in python programming. 1. Introduction The join() method in python programming joins different elements and return a combined string. This method takes the iterable as an argument. This method returns the TypeError exception if the iterable contains any non-string values. It is represented by the following syntax – Method syntax ...

Read More »

The Pleasures of Replatforming

In an earlier post on migration, I looked at different ways to take a codebase and convert it for a new architecture. The methods work best when the language is being kept the same, though the last idea, of taking the original code in small chunks and reworking those chunks as components of the new solution could probably be done ...

Read More »

Testing Logging Output in Java

One of my more popular posts on this site is on how to use Mockito to mock logging. Testing that the logged output is as expected seems to be on the cusp of a good/bad idea. Is the logged output the intended behaviour of the application? or is it an implementation detail that you’re just mirroring in a test? Arguably, ...

Read More »

How To Convert String to Float in Kotlin?

1. Overview In this tutorial, We will learn how to convert the String value to Float in Kotlin. This conversion is done using toFloat() method of String class. But there are many cases where it gives parsing errors for wrong inputs. 2. Kotlin String to Float using toFloat() Method Converting string to float is done with toFloat() method of string ...

Read More »

Kotlin – Convert Map to List Examples

1. Overview In this tutorial, We will learn how to convert the Map to List in kotlin programming. Map implementations such as HashMap or TreeMap can be converted into an ArrayList or List object. Let us explore thedifferent ways to do this conversion. 2. Converting HashMap to List in Kotlin Using ArrayList Constructor This approach is the simple one and ...

Read More »

How to get current date time with Java 8

 In this quick tutorial, we will see, how to get current date time using Java 8. Java 8 had come up with new set of classes for date and time under java.time package, which are: –  java.time.Instant – java.time.ZonedDateTime – java.time.OffSetDateTime – java.time.LocalDateTime Let us see how we can get current date and time using these classes and how they ...

Read More »