Method Reference in Java 8 [::] Java 8 Core Java java by devs5003 - March 20, 2024March 21, 20242 Method Reference is a wonderful feature introduced in Java 8. Apart from taking advantage of functional programming, one of the biggest advantages in using a Lambda expression is to minimize the lines of code. Similarly, Method Reference in Java 8 [::] also minimizes lines of code even more than Lambda. However, we use both of them in the presence of functional interfaces only. Moreover, It is also a concise and simpler form of lambda expression. In this article, we will also learn how to change a Lambda expression into a method reference. Let's start discussing about 'Method Reference in Java 8 [::]' and it's related concepts. What is Method Reference(::)? As we have seen in Lambda expression topic that we use lambda
Improvements In Java Collection API Collections Core Java java by devs5003 - March 10, 2024March 11, 20240 In this article "Improvements in Java Collection API" we will learn about the origin of classes in different versions of jdk. Also, If any new class or interface introduced, what was the purpose of introducing that? What was the weakness of previous version of it? Why the new class/interface introduced? What all new features introduced in Collection classes/interfaces? and so on. We are going to discuss about these kinds of questions in this article accordingly. In fact, we will learn about Enhancement of java collection classes step by step & also version by version simultaneously. Primarily, we will focus on Java collection features in JDK 1.0, 1.2, 1.4, 1.5, 1.6 and 1.8, 9 10, 11, 21 respectively. Improvements in Java Collection
Singleton Class In Java With Examples: A Comprehensive Guide Core Java java by devs5003 - February 13, 2024February 16, 20240 In this article, we will explore the concept of Singleton class in Java, with different implementation techniques, their advantages and disadvantages, and provide various code examples to demonstrate their utilization. In Java programming, the concept of Singleton class comes from the Singleton design pattern which is one of the most commonly used design patterns in Java. It comes under the category of creational design patterns and is used to ensure that a class has only one instance and provides a global point of access to that instance. What is a Singleton class in Java? A class that can have only one instance (object) at any given time during the runtime of an application. It provides a global point of access to this instance,
Static Keyword In Java With Examples Core Java java by devs5003 - February 8, 2024March 11, 20242 The understanding of static keyword in java is so important that we as a java programmer cannot imagine a single runnable program without a static keyword. If we want to run a small program, we must use either main() method (which is static) or a static variable/block till JDK 1.6. Even we don't have the static variable/block option to run the program starting JDK 1.7 onward. Therefore, we should know all about the static keyword and keep in mind the significance of 'Static in Java'. We as a Java developer can't leave the static keyword untouched. Hence, we should have a clear understanding of static in java mandatorily. Additionally, the static keyword in java is an important topic in the interview
Singleton Design Pattern in Java with all Scenarios java Core Java Design by devs5003 - February 1, 2024February 16, 20249 In this article, we will go through all the scenarios of the Singleton pattern to make it crystal clear. From the definition, it seems to be a very simple design pattern but when it comes to implementation, it creates a lot of implementation concerns. Also, the implementation of Java Singleton pattern has always been a controversial topic among developers. Here, we will learn about Singleton Design Pattern in Java with all Scenarios, different ways to implement Singleton design pattern and some of the best practices for its usage. Sometimes, we get the requirement for some classes to have exactly one instance. There are many occasions when we need only one instance of the Object and if we instantiate more than one,
Java Reference Tutorial For Young Programmers Core Java java by devs5003 - January 26, 2024January 28, 20240 Java Reference Tutorial For Young Programmers by CodeMonkey Coding is probably a term you and your children may be hearing more often as time goes on. The term, for purposes of Java, refers to the process of writing computer programs and is becoming a more and more demanding skill in the job market. That makes it an important addition to the education curriculum for many years. Even very young kids can get a start with learning to code using age relevant websites like CodeMonkey. Besides preparing them adequately for their future, there are plenty of other reasons to teach coding to children. Using Java is an ideal introduction to the topic. This guide will take you through everything you need to
How to Sort List by Date in Java 8 ? java Core Java Java 8 by devs5003 - January 24, 2024February 10, 20240 Sorting a List by Date sometimes becomes a bit tricky. One of the tricky part is how to handle date format and then perform the sorting. In this article 'How to Sort List by Date in Java 8 ?', we will discuss sorting of three types of Dates. These are java.util.Date, java.time.LocalDate and java.time.LocalDateTime. Further, in order to sort the list, we will use three approaches. Using these approaches, we will utilize the new concepts introduced in Java 8. Moreover, these concepts are Lambda Expressions, Method References and Stream API. Additionally, if you want to know how to sort a general list in Java 8, we have separate article on 'How To Sort the List In Java 8?'. Here we will
JVM Architecture and Class Loaders Java JVM Core Java java by devs5003 - January 12, 2024March 10, 20240 Being a java developer we should know the details of 'How a java class file gets processed by JVM internally'. In this article on 'JVM Architecture and Class Loaders Java' we will learn about how JVM handles a .class file and does the internal processing to generate the output. However It is just to remind you that the JVM(Java virtual Machine) is responsible to process the compiled .class file in byte-code form. In this article we will discuss about "JVM Architecture and Class Loaders Java". The Java Virtual Machine (JVM) is a key component of the Java platform, responsible for executing Java applications. Moreover, along with the internal processing of a class file we will also learn the internal Architecture of
A Comprehensive Guide to Java Testing Frameworks Core Java java Java Testing by devs5003 - November 28, 2023December 18, 20230 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
How to Extract Text from Image Using Java? Core Java java by devs5003 - November 16, 2023February 20, 20241 Many a times we come across a requirement when we need to extract text from image. This process is also known as Optical Character Recognition (OCR). OCR is extensively useful in various use cases, such as converting physical documents into digital formats to make them searchable and editable, automating data entry processes to minimize errors, extracting information from checks in banking institutions, digitizing patient records in the healthcare industry, converting case files into digital formats in the legal department, digitizing textbooks, extracting information from invoices, receipts, and many more. This article will focus on How to Extract Text from Image Using Java?. Although there are many online image-to-text converter tools are introduced that can extract text from image automatically, but knowing