Skip to content

Instantly share code, notes, and snippets.

View RajaniCode's full-sized avatar

Rajani RajaniCode

View GitHub Profile
@RajaniCode
RajaniCode / paths
Last active March 19, 2024 18:55
paths
###########################################################################################################################
# Google Cloud
###########################################################################################################################
***************************************************************************************************************************
# Google Cloud CLI # gcloud
***************************************************************************************************************************
@RajaniCode
RajaniCode / Java 6 - 1
Last active March 18, 2024 13:44
Java 6 - 1
// Java 6
/*
Java SE 6 adds no major features to the Java language proper, but it does enhance the API libraries, add several new packages, and offer improvements to the run time.
*/
/*
# Float and Double Constants MAX_EXPONENT
MIN_EXPONENT
MIN_NORMAL
# System Class
@RajaniCode
RajaniCode / CS Java Mnemonics
Last active March 18, 2024 09:10
CS Java Mnemonics
// Mnemonics / CS // Java // Subject to updates in newer versions of Java and CS
/******************************************************************************/
// CS // class, interface, struct, readonly struct, ref struct, readonly ref struct, record, positional record, record struct, readonly record struct
/******************************************************************************/
/*
// Reference Type
class C : I
{
static C() { }
@RajaniCode
RajaniCode / Java CS Mnemonics
Last active March 18, 2024 09:08
Java CS Mnemonics
// Mnemonics // Java // CS // Subject to updates in newer versions of Java and CS
// Override // Java // CS
import java.lang.System;
class Program {
public static void main(String[] args) {
BaseClass bc = new BaseClass();
BaseClass bcr;
DerivedClass dc = new DerivedClass();
@RajaniCode
RajaniCode / Java22.java
Last active March 17, 2024 11:00
Java22.java
// Java 22
// OpenJDK 22
// % export PATH="/Users/rajaniapple/Downloads/Software/OpenJDK/JDK22/jdk-22.jdk/Contents/Home/bin/":$PATH
// % java --enable-preview --source 22 --enable-native-access=ALL-UNNAMED --add-modules=jdk.incubator.vector Java22.java
// Or
// % javac -Xlint:preview --enable-preview --source 22 --add-modules=jdk.incubator.vector Java22.java
// % java --enable-preview --enable-native-access=ALL-UNNAMED --add-modules=jdk.incubator.vector Java22
// Java 21
@RajaniCode
RajaniCode / Java7.java
Last active March 17, 2024 10:35
Java7.java
// Java 7
/*
1. Binary Literals
2. Strings in switch Statements
3. The try-with-resources Statement
4. Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking
5. Underscores in Numeric Literals
6. Type Inference for Generic Instance Creation
7. Improved Compiler Warnings and Errors When Using Non-Reifiable Formal Parameters with Varargs Methods
*/
@RajaniCode
RajaniCode / Java8.java
Last active March 17, 2024 10:27
Java8.java
// Java 8
/*
1. Lambda Expression
2. Method References
3. Default Interface Methods
4. Static Interface Methods
5. Functional Interfaces
6. Stream
7. Optional
8. Time API for dates, times, instants, and durations
@RajaniCode
RajaniCode / Java9.java
Last active March 17, 2024 10:23
Java9.java
// Java 9
/*
1. Private Interface Methods
2. Try-With-Resources on Final Variables
3. Diamond Operator for Anonymous Inner Classes
4. SafeVarargs Annotation on Private Methods
5. Collections Factory Methods
6. Optional Methods
*/
@RajaniCode
RajaniCode / Java10.java
Last active March 17, 2024 10:21
Java10.java
// Java 10
/*
1. Local-Variable Type Inference
2. Time-Based Release Versioning
3. Unmodifiable Collections
4. Optional Methods
*/
import static java.lang.System.out;
import java.io.BufferedReader;
@RajaniCode
RajaniCode / Java11.java
Last active March 17, 2024 10:18
Java11.java
// Java 11
/*
1. Launch Single-File Source-Code Programs
2. Preview Switch
3. Nest-Based Access Control
4. Nestmate Reflection
5. Local-Variable Syntax for Lambda Parameters
6. String Methods
7. File Methods
8. Collection to Array