Skip to content

Instantly share code, notes, and snippets.

View trinhduyhung's full-sized avatar
🏠
Working from home

Trinh Duy Hung trinhduyhung

🏠
Working from home
View GitHub Profile
@rshepherd
rshepherd / Scoping.java
Last active August 28, 2020 04:56
An example of the implications of Java's lexical scoping rules in the context of a class.
public class Scoping { // class scope begins
// Because 'a' is declared just inside the *class curly braces* it is in 'class scope'
// therefore its visible everywhere inside the class. This is the 'widest' scope in this file.
private int a = 0;
// Class variables have class scope!
private static String classVariable = "I am a class variable!";
public void methodOne() { // methodOne scope begins
@staltz
staltz / introrx.md
Last active October 26, 2025 03:06
The introduction to Reactive Programming you've been missing