A Copy Constructor in Java is a special type of Constructor, which enables us to get a copy of an existing object. Copy Constructors can take only one parameter, which is a reference of the same class. In this article lets understand what is copy constructor and its uses. … [Read more...]
37 Alphabet Pattern Programs in Java | Character Pattern Programs
In this article, we will learn to print the different Alphabet Pattern Programs in Java. This is one among the popular Java interview questions for fresher. Let's look into the below possible Alphabet / Character Pattern Programs in Java. … [Read more...]
8 Best ways to Iterate through HashMap in Java
As a Java developer, everyone should know how to Iterate through HashMap, as it will be part of his routine programming. Unlike other Collections, we cannot iterate through HashMap directly we need to get the keySet or entrySet to iterate. In this article, we will learn about all the different ways of iterating a HashMap in Java. … [Read more...]
Java 8 – Lambda Expressions with Examples
Lambda expressions are introduced in Java 8 and is one of the most important feature of Java 8. A Lambda expression is a block of code with can be passed around and executed which is not possible in the previous versions of Java, other programming languages such as LISP, Python, Ruby, Scala etc.. has this feature. With the introduction of Lambda expressions Java paved way … [Read more...]
Top 8 Java Interview Questions On main() Method
Execution of a Java application starts with the main() method, this is one of an important Java interview questions for both freshers and experienced. In this article, we will discuss some of the possible java interview questions on main() method. … [Read more...]
How to convert XML to JSON in Java – Jackson 2 XmlMapper
Jackson is one of the popular JSON Parser for Java application, with the release of Jackson 2 they have added the support of XML Parsing. In this article, we will learn how to convert XML to JSON using Jackson 2 library. … [Read more...]
7 Java Reverse String Programs – Including Word by Word
How to Reverse a String in Java is one of the popular interview questions, but the interviewer might add some twist to it by asking you to write the code without using the reverse() method, recursion, etc. In this article, we will learn the possible ways of reversing a string in Java. We will look into techniques of reversing a single word and group of words in a sentence [Word … [Read more...]
Java 9 – jdeprscan
jdeprscan tool can be used as a static analyzing tool which scans the Class / JAR file for the usage of deprecated API. jdeprscan tool identifies the deprecated APIs which defined by Java SE Deprecated APIs, third-party libraries will not be identified. … [Read more...]
How to use PDFBox to Create / Read PDF in Java + Maven
Apache PDFBox is an open source library for Java to work with PDF documents.In this article, we will learn how to use PDFBox to Create / Read PDF in Java. … [Read more...]
Private Methods in Interfaces Java 9
In Java 9, Private Methods in Interfaces has been introduced. This enables code sharing between non-abstract methods in an interface. In this article apart from understanding the Private Method in Interface, we will learn how the Interface has evolved in different versions of Java. … [Read more...]
Jackson Tree Model Example – JsonNode
In this Jackson Tree Model Example, we will learn how to convert Java Object to JSON and vice-versa ( JSON to Java object). Jackson Tree Model creates a tree representation of a JSON similar to DOM Tree. Hence it is possible to traverse through each node. Jackson provides JsonNode API through we will be accessing the individual node using the node name.The readTree and … [Read more...]
Jackson Streaming API Example | Read and Write JSON
Jackson reads and writes JSON through a high-performance Jackson Streaming API, with a low memory and process overhead. The only problem with Streaming API is that we need to take care of all the tokens while parsing JSON data. All the JSON values must be read/write in the same order in which it arrives. … [Read more...]
- « Previous Page
- 1
- 2
- 3
- 4
- 5
- …
- 11
- Next Page »