Skip to content

Instantly share code, notes, and snippets.

@krmgns
Created November 13, 2019 18:27
Show Gist options
  • Save krmgns/514e8ad8cd9b95eadf8910ab10f4e373 to your computer and use it in GitHub Desktop.
Save krmgns/514e8ad8cd9b95eadf8910ab10f4e373 to your computer and use it in GitHub Desktop.
uninitialized
// Java
class Foo { Integer i; }
class Test {
public static void main(String args[]) {
System.out.println(new Foo().i == null);
}
}
// JavaScript
class Test {}
console.log(new Test().i == null)
// Go
package main
type Test struct { i *int }
func main() {
println(new(Test).i == nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment