Posts

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 - RSA Encryption and Decryption example

Image
The RSA algorithm (Rivest-Shamir-Adleman) is a cryptographic algorithm that is used for specific security services or purposes, which enables public-key encryption and is widely used to secure sensitive data, particularly when it is being sent over an insecure network such as the HTTP. A public key is shared publicly, while a private key is secret and must not be shared with anyone. The following illustration highlights how asymmetric cryptography works: Example 1: The Cipher Type: RSA/ECB/PKCS1Padding import java.security.spec.PKCS8EncodedKeySpec import javax.crypto.Cipher import java.security.spec.X509EncodedKeySpec import java.io.IOException import java.security.* import java.util.* /* * RSA Key Size: 1024 * Cipher Type: RSA/ECB/PKCS1Padding */ class RSAKotlinDemo1 { var privateKey: PrivateKey var publicKey: PublicKey companion object { // convert String publickey to Key object @Throws (GeneralSecurityException:: class , IOException:: class

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