Posts

Fun with computers

Image
One simple trick to create quick art in word document is using Unicode characters. Just enter the unicode character code in word document and press <mark> Alt+x </mark> You will see unicode will covert into a require character or picture. For example: - 1F412 will convert into Monkey We can get full list of unicode character from following website: www.compart.com

Theoretical Computer Science Cheat Sheet

Credits: Steve Seiden (Lousiana State University)

Java 21 (LTS)

Java 21 is planned to be released on <mark>19 September 2023</mark> (General Availability). It is a Long term support (LTS) version of Java, prior to Java 21 the LTS version of Java is Java 17. JAva 21 includes following <mark> 15 new features </mark>: - [JEP 430: String Templates (Preview)](https://openjdk.java.net/jeps/430) - [JEP 431: Sequenced Collections](https://openjdk.java.net/jeps/431) - [JEP 439: Generational ZGC](https://openjdk.java.net/jeps/439) - [JEP 440: Record Patterns](https://openjdk.java.net/jeps/440) - [JEP 441: Pattern Matching for switch](https://openjdk.java.net/jeps/441) - [JEP 442: Foreign Function & Memory API (Third Preview)](https://openjdk.java.net/jeps/442) - [JEP 443: Unnamed Patterns and Variables (Preview)](https://openjdk.java.net/jeps/443) - [JEP 444: Virtual Threads](https://openjdk.java.net/jeps/444) - [JEP 445: Unnamed Classes and Instance Main Methods (Preview)](https://openjdk.java.net/jeps/445) - [JEP 446: Scoped V...

Java Executor Framework

- Java <mark> **Executor** </mark> is an interface that provides a way to execute tasks asynchronously. It provides a simple way to manage thread creation and execution by abstracting away the details of thread management. With the Executor interface, you can submit tasks to be executed by an underlying thread pool. - <mark>**Executors**</mark> is a class that provides factory methods for creating instances of the Executor interface. The Executors class provides a way to create thread pools of different sizes and types. It also provides methods for creating specialized thread pools, such as cached thread pools, fixed-size thread pools, and scheduled thread pools. - <mark>**ExecutorService**</mark> is an interface that extends the Executor interface and provides additional methods for managing and controlling the execution of tasks. It provides methods for submitting tasks, waiting for tasks to complete, and shutting down the executor service. Her...

Encryption and Decryption in Java

Java provides several algorithms for encryption and decryption of data, including symmetric-key algorithms and asymmetric-key algorithms. 1. **Symmetric-key algorithms:** These algorithms use the same key for both encryption and decryption. Some commonly used symmetric-key algorithms in Java include: 1. Advanced Encryption Standard (AES) 2. Data Encryption Standard (DES) 3. Blowfish 4. Twofish 2. **Asymmetric-key algorithms:** These algorithms use different keys for encryption and decryption. They are typically used for secure communication between two parties, such as in public key cryptography. Some commonly used asymmetric-key algorithms in Java include: 1. RSA (Rivest-Shamir-Adleman) 2. Elliptic Curve Cryptography (ECC) 3. Diffie-Hellman key exchange Java provides built-in classes and interfaces for implementing these encryption and decryption algorithms, such as the `javax.crypto` package for symmetric-key algorithms and the `java.security` package for asymmetric-key al...