Knowing how constructors work in Java will help you to design a code structure that is flexible and maintainable. In this Java code challenge, you will learn how a constructor behaves when we use inheritance. Do you know what happens when one class...
Did you know that every variable in Java is passed by value and not by reference? However, what happens when we pass an object to a method? Do we manipulate the value or the reference? This is exactly what you will explore in the following Java...
Functional interfaces in Java are crucial to master. In this Java code challenge, we will explore the Supplier and Consumer functional interfaces. Do you know how a lambda behaves in Java? Try to solve this Java code challenge and make sure you know...
Composing functions with lambda might come in handy when you need to execute multiple functions. In the following Java code challenge, we will explore the UnaryOperator, Function, and BiFunction functional interfaces working in a composed way. Can...
Annotations with Java are widely used with most of the popular frameworks. Put simply, annotations are a way to configure metadata for a class, attribute, or method. You will see annotations being used for dependency injection for example. Lombok...
When there is a tricky bug in a Java application, knowing how edge-case situations happen makes all the difference. That’s because bugs usually happen because of edge-case scenarios. In this challenge there is an edge-case coding situation, do...
To search for elements in your sorted array, you can use the binary search algorithm. Of course, you can get it for free in the Java language! Therefore, the point of this Java Challenge is to learn how to use the binarySearch method. Can you solve...
This Java Challenge will teach you how to intercept a method with Java. When you need to intercept a specific method for some reason, you can use the same technique of this Java Challenge! It’s useful this knowledge on your toolbelt! You can...
The ThreadLocal class is useful to store and read data without colliding with other Threads even if the ThreadLocal instance is the same. Therefore, it’s a useful class to keep in mind whenever you need to manipulate data and avoid thread...
It’s crucial to know how the equals and hashCode methods work because in Java we use them all the time. When working with frameworks, using Collections, or even when comparing objects equality. Therefore, if you are able to solve this Java...