Java 11 – Var in Lambda

Java 11 allows to use var in a lambda expression and it can be used to apply modifiers to local variables. Consider the following program − Limitations There are certain limitations on using var in…

TypeScript Tuple

In this tutorial, you’ll learn about the TypeScript Tuple type and its usages. Introduction to TypeScript Tuple type A tuple works like an array with some additional considerations: The number of elements in the tuple is fixed….

Java 11 – Not Predicate

Java 11 introduced new method to Predicate interface as not() to negate an existing predicate similar to negate method. Consider the following program − Java11NotPredicate.java Output

Python Conditional Statements

What are Conditional Statements in Python? Conditional Statement in Python perform different computations or actions depending on whether a specific Boolean constraint evaluates to true or false. Conditional statements are handled by IF statements in…

TypeScript Enum

In this tutorial, you’ll learn about the TypeScript enum type and how to use it effectively. What is an enum An enum is a group of named constant values. Enum stands for enumerated type. To…

Java 11 – Optional Class

Java 11 introduced new method to Optional class as isEmpty() to check if value is present. isEmpty() returns false if value is present otherwise true. It can be used as an alternative of isPresent() method…

Java 11 – String API

Java 11 introduced multiple enhancements to String. String.lines() − Return the stream of lines of multi-line string. String.strip() − Removes the leading and trailing whitespaces. String.stripLeading() − Removes the leading whitespaces. String.stripTrailing() − Removes the trailing whitespaces. String.repeat(int) − Repeats…