diff --git a/site/content/jdk/valhalla/_index.md b/site/content/jdk/valhalla/_index.md index 112445f8..dfbe0a2f 100644 --- a/site/content/jdk/valhalla/_index.md +++ b/site/content/jdk/valhalla/_index.md @@ -7,16 +7,24 @@ Online sandbox for the latest early access build of [Valhalla project](https://j {{< sandbox version="javavalhalla" mainclass="Valhalla" preview="true" >}} {{< sandboxsource "Valhalla.java" >}} value class X { -} -identity record Id(String key) { +final int i; + + X(int i) { + this.i = i; + } + } public class Valhalla { public static void main(String[] args) { - System.out.println(new X()); - System.out.println(new Id("me")); + var x1 = new X(5); + var x2 = new X(5); + var x3 = new X(7); + + System.out.println(x1 == x2); + System.out.println(x1 == x3); } }