Posts

Showing posts with the label Core Java

Java 8 Stream API Interview Questions and Answers - Frequently asked

In this tutorial, we are going to explore some of the Java Stream Interview questions and answers. More Java interview questions and answers... Spring Boot actuator interview questions and answers Spring Core - Interview Questions Top Spring Cloud Interview Questions Spring Security Interview Questions Spring MVC - Interview Questions Spring Webflux Interview Questions Top Spring Boot Interview Questions Spring Data JPA Interview Questions and Answers Top Mockito Interview Questions and Answers Java Collections Interview Questions Java Stream API Interview Questions and Answers - Frequently asked Quarkus - Interview questions and answers   Spring Interview questions and answers 1. What is Java Stream API? Java 8 introduced the concept of stream, Stream represents a sequence of objects from a source, which supports aggregate operations. It works very well in conjunction with lambda expressions. We can engender a pipeline of stream operations to manipulate data by performing operations l

Kotlin Programming in Visual Studio Code IDE (Ubuntu)

Image
Welcome to our tech tour! You are a genuine explorer👉 Today we are going to show you how to configure Visual Studio Code for Kotlin development.   Why Visual Studio Code?   Visual Studio Code features a lightning expeditious source code editor, perfect for our development activities. With support for hundreds of languages, VS Code avails us instantly productive with syntax highlighting, bracket-matching, auto-indentation, box-cull, snippets, and more. Visual Studio Code fortifies macOS, Linux, and Windows - so we can hit the ground running, no matter the platform.     A quick overview of Kotlin,   Kotlin is a new open-source programming language targeting the Java platform. Kotlin is concise, safe, pragmatic, and fixated on interoperability with Java code. It can be used virtually everywhere Java is utilized today: for server-side development, Android apps, and much more. Kotlin works great with all subsisting Java libraries and frameworks and runs with the same level of performa

JVM [Java Virtual Machine] - Architecture

Image
Java Virtual Machine (JVM) is a designation that provides a runtime environment in which java bytecode can be executed. As the denomination implicatively insinuates, the JVM acts as a “virtual” machine or processor. Java's platform independence consists mostly of its Java Virtual Machine (JVM). JVM is a component of the Java Run Environment (JRE). In other programming languages, the compiler engenders machine code for a particular system. However, the Java compiler engenders code for a Virtual Machine known as Java Virtual Machine.   The JVM performs the following operation: Loads code Verifies code Executes code  Here is how JVM works First, Java code is compiled into bytecode. This bytecode gets interpreted on different machines. Between the host system and Java source, Bytecode is an intermediary language.JVM in Java is responsible for allocating memory space. JVM Architecture JVM architecture in Java contains classloader, memory area, execution engine, etc.

Java HashMap Example

Image
The HashMap class is roughly identically tantamount to Hashtable, except that it is unsynchronized and sanctions nulls.Java HashMap class implements the Map interface which sanctions us to store key and value pair, where keys should be unique. If you endeavor to insert the duplicate key, it will supersede the element of the corresponding key. It is facile to perform operations utilizing the key index like the update, delete, etc. As shown in the above figure, the HashMap class extends AbstractMap class and implements the Map interface, the Cloneable interface, and the Serializable interface. public class HashMap< K , V > extends AbstractMap< K , V > implements Map< K , V >, Cloneable, Serializable { Constructors of Java HashMap class 1)  public HashMap( int initialCapacity, float loadFactor) Constructs an empty HashMap with the specified initial capacity and load factor. 2)  public HashMap( int initialCapacity) Constructs an empty HashMap with the specifie