1A and 1B

This commit is contained in:
Aditya Tiwari
2026-01-23 14:09:56 +05:30
commit f2b4d16eff
7 changed files with 24 additions and 0 deletions

13
ThreadExample1.java Normal file
View File

@@ -0,0 +1,13 @@
public class ThreadExample1 extends Thread {
public void run(){
int a = 10;
int b = 12;
int result = a + b;
System.out.println("Thread started running..");
System.out.println("Sum of two numbers is: " + result);
}
public static void main(String[] args) {
ThreadExample1 t1 = new ThreadExample1();
t1.start();
}
}