Annotations In Java java Core Java by devs5003 - May 31, 2024June 2, 20245 Before the introduction of Annotations, we were extensively using XML for metadata. Using XML for metadata as configurations separates the configuration from the code. At the later stage, when enterprise applications grown up, maintenance of XML was getting inconvenienced. Also, XML loosely couples from the code, in some cases almost separates. Then architects & developers started looking for solutions which can be tightly coupled with the code instead of XML. Then the solution was an introduction to Annotations. Don't get confused with the fact that we should always prefer loose coupling as it differs in case of Annotations. You will feel the benefits almost always when you completely understand the topic 'Annotations In Java'. Just using an annotation instead of creating
How to implement Redis Cache in Spring Boot? Redis java Spring Boot by devs5003 - May 24, 2024November 15, 20255 Many a time, we all come to a phase when our application does not perform well as it is expected to. Apart from several other solutions, we also look for a caching technique to make DB calls faster. In order to make it possible, we have Redis Cache technique in place. Redis cache helps us by minimizing the number of network calls while accessing the data from DB. Needless to say, our topic of discussion in this article is 'How to implement Redis Cache in Spring Boot Application?'. Spring Boot supports this feature via the dependency 'Spring Data Redis'. In addition, we need to download Redis Server to make Redis Cache functional in the Spring Boot Application. Moreover, apart from Cache,
Google Gemini For Developers and Programmers AI for developers and Programmers Google Bard Google Gemini java Programming by devs5003 - May 17, 2024January 18, 20260 Undoubtedly, ChatGPT has gained a popularity during the early days of its launch. It is very helpful in getting your task done promptly irrespective of the area or industry you belong to. Similarly, Gemini (A Google Product) is gaining the popularity day by day to become useful for everybody. Gemini was previously known as Bard. It is a very handy tool for developers and programmers as well. Some experts in the industry observed that the Gemini provides better responses to Developers and Programmers in terms of explanation & authenticity. Therefore, it becomes important to know its capabilities for developers and programmers. In this article, we will talk about 'Google Gemini for Developers and Programmers'. What is Google Bard/Gemini? Google Bard(Gemini now) is a large
Continuation-Passing Style-CPS in Java Core Java java Programming by devs5003 - May 15, 2024May 17, 20240 Continuation-Passing Style (CPS) is a programming model used to manage control flow in software applications. It provides a way to handle asynchronous or callback-based programming by explicitly passing control from one function to another. Although this concept was originally generalized in functional programming languages like Scheme, Haskell, and Scala, but CPS can also be implemented in object-oriented languages like Java. In this article, we'll analyze the concepts behind Continuation-Passing Style-CPS in Java and explore its implementation with code examples. What is Continuation-Passing Style? In traditional programming model, control flow is managed through the call stack. When a function is called, the current execution context is pushed onto the stack, and when the function returns, the context is popped off the stack, allowing
Core Java Interview Questions with Detailed Answers Interview Core Java java by devs5003 - May 15, 2024November 4, 20250 Here in this section we will see Core Java Interview Questions and answers which will be valuable for any type of interview in Java Programming Language. I am sure that you will find some unique questions that you may rarely see in other sources. Moreover, you will find clear explanations of the answers to each question. When you go through the answers you will find that while answering the questions related new terms are also explained. If you need any other question to be added here, don't hesitate to put your notes in the comment section. Why are the Java primitive data types not objects? Why is Java not a pure Object-Oriented programming Language? Objects always consume more memory than primitives. If
How to Implement Feign Client in Spring Boot Microservices? Feign Client java Microservices Spring Boot Spring Cloud by devs5003 - May 10, 2024November 11, 20259 When two web applications communicate with each other for data exchange, they work on Producer-Consumer technique. An application who produces data is known as a Producer/Provider application. Similarly the one who consumes data is known as Consumer application. As a Java developer, we might be very familiar with REST API for Producer application whereas RestTemplate for Consumer application. With Microservices based application also, two Microservices communicate with each other and follow the Producer-Consumer model. Here, in consumer side, we use a concept 'Feign Client' as a better option instead of RestTemplate in order to minimize our effort of coding. Therefore, our topic of discussion is 'How to Implement Feign Client in Spring Boot Microservices?'. Apart from consuming REST services in an
Java IDE Eclipse Keyboard Shortcuts eclipse IDE java by devs5003 - May 9, 2024May 26, 20242 In this article, we will discuss about one of the favorite IDE for all java developers, the Eclipse. Moreover, as we believe in learning anything from the basics, we will first start learning fundamentals of an IDE. At the end of this article you must feel comfortable working on Eclipse IDE. Equally important, we will discuss about 'Java IDE Eclipse Keyboard Shortcuts' in between. Finally, we will conclude our topic with setting up build path and changing JRE versions in Eclipse, which you will be doing multiple times while developing a project. If you are a Java Developer and using Eclipse IDE in your project, I will suggest you to be master in Eclipse. Since you will be using Eclipse most
Record vs. Lombok Core Java java Lombok Record In Java by devs5003 - May 1, 2024January 24, 20250 Every Java developer attempts to reduce the boilerplate code whenever it is possible. Undoubtedly, the new JDK versions and even modern frameworks like Spring, Spring Boot have already contributed much to make it possible. In this matter, Records in Java 16 and Lombok library are also known to reduce boilerplate code. Java 16 Records are a native language feature introduced in Java 16. Lombok is a third-party library that provides annotations to eliminate repetitive common tasks. In this detailed comparison 'Record vs. Lombok', we will explore the definition, syntax, usage, advantages, disadvantages, and practical examples of Java 16 Records and Lombok, and compare them based on various parameters. Let's start with what is Record and what is Lombok. Record vs. Lombok: Purpose, Usage,
Java Scheduler: How to Schedule a Job in Java Spring Boot Scheduler Scheduling java Spring Spring Boot by devs5003 - April 26, 2024May 6, 202545 Sometimes we come across a situation when we expect a task should execute only at a particular point of time or re-execute within a particular time interval. Simultaneously, our client expects a functionality to be executed at a particular time on an hourly basis, daily basis, weekly basis, monthly basis or even some other as well. In fact, in all these types of situations we implement scheduling to get the requirements fulfilled accordingly. For example, one of the most popular implementation is the report generation at a particular time. On the other hand, almost every client expects this functionality to have in the project. Currently the most popular one is the PDF report. Consequently, our topic 'Java Scheduler: How to Schedule
Java Testing Frameworks Core Java java Java Testing by devs5003 - April 22, 2024November 26, 20240 A Comprehensive Guide to Java Testing Frameworks Testing in Java applications is an essential part of the software development process It plays a vital role in reliability, code quality, and the complete success of the application. There are various testing frameworks that make testing easier for developers & testers. These frameworks provide systematic conditions that allow developers to write, organize, and execute tests in a structured manner. Their primary purpose is to validate the correctness, functionality, and performance of the code under diverse conditions. A Comprehensive Guide to Java Testing Frameworks These frameworks facilitate different types of testing methodologies. For example, Unit testing focuses on verifying the smallest parts of an application, such as individual methods or classes. On the other hand, Integration testing