From db116dead80882d3e54481496a115c1a6041672c Mon Sep 17 00:00:00 2001 From: StromMind_7 <116422055+Jonessam7@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:36:57 +0530 Subject: [PATCH] Create add.java --- add.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 add.java diff --git a/add.java b/add.java new file mode 100644 index 0000000..c70a4fb --- /dev/null +++ b/add.java @@ -0,0 +1,13 @@ +public class AddNumbers { + public static int add(int a, int b) { + return a + b; + } + + public static void main(String[] args) { + int num1 = 5; + int num2 = 10; + int result = add(num1, num2); + + System.out.println("The sum of " + num1 + " and " + num2 + " is: " + result); + } +}