Java String Interpolation with Examples

In this article, we will look at the concept of String Interpolation. We will look at its description, the need for String Interpolation. Also, we look at different techniques to perform String Interpolation with implementation in Java. String Interpolation is a process where we evaluate a String containing one or more Placeholders (Temporary Name or Substitute) by replacing it with their corresponding values. It allows to dynamically print out text output. So, in short String Interpolation allows us to put

Read more

Evaluate Postfix Expression in Java

In this article, we will look at how to evaluate a given Postfix expression to a result value. This is a problem related to Stack Data Structure. We will look at the algorithm with a step-by-step example along with the implementation in code. Let us first have a quick look at Postfix Expressions. So, Postfix Expressions are the mathematical expressions where for each pair of Operator and Operands, the operators come after operands. Hence, the evaluation order is from left

Read more

Java Reflection Invoke Static Method

This article will look at how we can use Java Reflection API to invoke a Static method. We will see the steps and the explanation with code. Let us first have a quick look at Reflection API. Reflection in Java is a process of examining or modifying the behavior of a class at run time. Moreover, It is an API or Application Programming Interface having its use in debugging. It is also used in testing tools, with the primary focus

Read more