From 48c828ec9694801e1aa7bc3c3aeee1dfeb1e04d6 Mon Sep 17 00:00:00 2001 From: Charishma Nadipalli <69669327+charish37@users.noreply.github.com> Date: Fri, 7 Nov 2025 18:12:10 -0500 Subject: [PATCH] Fix print method signature in LambdaExample --- LambdaExample.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/LambdaExample.java b/LambdaExample.java index 5355ae5..6f235f0 100644 --- a/LambdaExample.java +++ b/LambdaExample.java @@ -9,13 +9,18 @@ //} +Interface Shape { + void draw(); +} + + public class LambdaExample { public static void main(String[] args){ Shape rectangle = () -> System.out.println("rectangle drawn"); print(rectangle); } - public static void print(Shape shape){ + public static void print(Shape: Shape shape){ shape.draw(); } }