Posts

Showing posts from February, 2021

Java 12 Features

1.Java 12 Features 2.JVM Changes JEP 189 – Shenandoah: A Low-Pause-Time Garbage Collector (Experimental) JEP 346 – Promptly Return Unused Committed Memory from G1 JEP 344 : Abortable Mixed Collections for G1 JEP 230 and 344 JEP 341 Default CDS Archives 3.Language Changes And Features Switch Expressions (Preview) File.mismatch method Compact Number Formatting Teeing Collectors Java Strings New Methods JEP 334: JVM Constants API JEP 305: Pattern Matching for instanceof (Preview) Java 12 Features Some of the important Java 12 features are; JVM Changes – JEP 189, JEP 346, JEP 344, and JEP 230. Switch Expressions File mismatch() Method Compact Number Formatting Teeing Collectors in Stream API Java Strings New Methods – indent(), transform(), describeConstable(), and resolveConstantDesc(). JEP 334: JVM Constants API JEP 305: Pattern Matching for instanceof Raw String Literals is Removed From JDK 12. Let’s look into all these Java 12 features one by one.

Java 11 Features

Why is Java 11 important? Which JDK build should I download and what are the benefits of each of them? How to download Java 11 Free Version? Java 11 Features: Running Java File with single command Java String Methods Local-Variable Syntax for Lambda Parameters Nested Based Access Control JEP 309: Dynamic Class-File Constants JEP 318: Epsilon: A No-Op Garbage Collector JEP 320: Remove the Java EE and CORBA Modules JEP 328: Flight Recorder JEP 321: HTTP Client Reading/Writing Strings to and from the Files JEP 329: ChaCha20 and Poly1305 Cryptographic Algorithms JEP 315: Improve Aarch64 Intrinsics JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)  JEP 335: Deprecate the Nashorn JavaScript Engine Conclusion

Java 10 Features

In this article, we will discuss the various features added in Java10 release. Before that, let’s go over some changes introduced to java release model. Introduction Local Variable Type Inference Unmodifiable Collections.   copyOf(). , Unmodifiable*() Optional*.orElseThrow() Performance Improvements Container Awareness Root Certificates Deprecations and Removals Command Line Options and Tools APIs Time-Based Release Versioning Conclusion 1. Introduction JDK 10 , which is an implementation of Java SE 10, was released on March 20, 2018.In this article, we’ll cover and explore the new features and changes introduced in JDK 10. 2. Local Variable Type Inference   Overview  One of the most visible enhancements in JDK 10 is type inference of local variables with initializers. This tutorial provides the details of this feature with examples. Introduction Until Java 9, we had to mention the type of the local variable explicitly and ensure it was compatible with the initializer used to initializ

Java 9 Features

Some of the important java 9 features are: Java 9 REPL (JShell) Factory Methods for Immutable List, Set, Map and Map.Entry Private methods in Interfaces Java 9 Module System Process API Improvements Try With Resources Improvement CompletableFuture API Improvements Reactive Streams Diamond Operator for Anonymous Inner Class Optional Class Improvements Stream API Improvements Enhanced @Deprecated annotation HTTP 2 Client Multi-Resolution Image API Miscellaneous Java 9 Features Java 9 REPL (JShell) Oracle Corp has introduced a new tool called “jshell”. It stands for Java Shell and also known as REPL (Read Evaluate Print Loop). It is used to execute and test any Java Constructs like class, interface, enum, object, statements etc. very easily. We can download JDK 9 EA (Early Access) software from https://jdk9.java.net/download/ G:>jshell | Welcome to JShell — Version 9-ea | For an introduction type: /help intro jshell> int a = 10 a ==> 10 jshell> System.out.println(“a value = ”

Java 8 features

Important features of java 8 are: forEach() method in Iterable interface default and static methods in Interfaces Interface Changes Functional Interfaces and Lambda Expressions Java Stream API for Bulk Data Operations on Collections Java Time API Collection API improvements Concurrency API improvements Java IO improvements Miscellaneous Core API improvements forEach() method in Iterable interface Whenever we need to traverse through a Collection, we need to create an Iterator whose whole purpose is to iterate over and then we have business logic in a loop for each of the elements in the Collection. We might get ConcurrentModificationException if iterator is not used properly, which mean if we modify collection then we may get this exception. Java 8 has introduced forEach method in java.lang.Iterable interface so that while writing code we focus on business logic only. forEach method takes java.util.function.Consumer object as argument, so it helps in having our business logic at a se

Spark Interview Questions for Beginners

Image
1. How is Apache Spark different from MapReduce? Apache Spark MapReduce Spark processes data in batches as well as in real-time MapReduce processes data in batches only Spark runs almost 100 times faster than Hadoop MapReduce Hadoop MapReduce is slower when it comes to large scale data processing Spark stores data in the RAM i.e. in-memory. So, it is easier to retrieve it Hadoop MapReduce data is stored in HDFS and hence takes a long time to retrieve the data Spark provides caching and in-memory data storage Hadoop is highly disk-dependent 2. What are the important components of the Spark ecosystem? Apache Spark has 3 main categories that comprise its ecosystem. Those are: Language support : Spark can integrate with different languages to applications and perform analytics. These languages are Java, Python, Scala, and R. Core Components : Spark supports 5 main core components. There are Spark Core, Spark SQL, Spark Streaming, Spark MLlib, and GraphX. Cluster Management : Spark can be r