Využi poslednú šancu prihlásiť sa na našu JavaScript akadémiu a nájdi si prácu snov!
Prihlás sa
00
dní
00
hod.
00
min.
Thread.startVirtualThread(() -> { System.out.println("Hello from a virtual thread!"); });
record Shape(String type) {}
var shape = new Shape("Rectangle");
if (shape instanceof Shape(String typeOfShape)) { System.out.println("Shape is of type " + typeOfShape); }
String description = switch (shape) { case Shape(String type) -> "Shape type: " + type; default -> "Unknown shape"; };
var employee = new Employee("Bob", new Address("New York", "USA")); if (employee instanceof Employee(String name, Address(String city, String country))) { System.out.println(name + " lives in " + city + ", " + country); }