final keyword is used in different contexts. First of all, final is a non-access modifier applicable only to a variable, a method, or a class. The following are different contexts where final is used. Final…
This blog explains about Stream part 3 in java is given below : map(Function) map(List of Objects -> List of Objects) ArrayList<Integer> al = new ArrayList<Integer>(); al.add(10); al.add(20); al.add(30); //…
This blog explains about Stream API in java is given below : Print Array values in Sorted Order: int[] ar = {10,5,7,3,6}; Arrays .stream(ar) //Intermediate Operation .sorted() // Intermediate Operation…
This blog explains about Method reference double colon operator in java is given below : Method Reference: :: Double Colon Operator: Short cut for Lambda Expressions:Code Readability:Compact. ArrayList<Integer> al =…
JAVA Features - Java 8 This Blog explains about Java 8 - New Features - Functions, forEach, Consumer Interface. Demo_Impl.java package function_consumer; public class Demo_Impl implements Demo_Interface{ public static void…
This Blog explains about Java 8 - New Features - default, static Methods in Interface, Predicates. Ticket booking. java package default_static_demo; import java.util.ArrayList; import java.util.Collection; import java.util.function.Predicate; public class Ticket_Booking…
This Blog explains about Java 8 - New Features - Lambda Expressions, Functional Interfaces. Lambda Expressions: WHY: Functional Programming WHAT: Anonymous Functions: Closures Function - Method: HOW: Eg: 1 public…
In Java, access modifiers are keywords used to define the accessibility or visibility of classes, variables, methods, and constructors. There are four types of access modifiers in Java: Image referred…
Image referred from: http://www.sitesbay.com/java/images/basic-java/Static-and%20non-Static-Method-rules.png static: In Java, the ‘static’ keyword is used to declare members (variables and methods) that belong to the class itself, rather than to individual instances of…
Before we discuss Java data types, programming languages categorized into two types there are, Statically typed programming languages Dynamically typed programming languages Image referred from: https://nosleepjavascript.com/javascript-is-best/ Statically typed programming languages…