Unverified Commit 5c029c9a authored by Lokesh Singh's avatar Lokesh Singh Committed by GitHub

Add files via upload

parent fc27731e
public class exception {
public static void main(String[] args) {
try {
int arr[] = {1,2,3};
System.out.println(arr[1]);
}
catch (Exception e) {
System.out.println("Something went wrong");
} finally {
System.out.println("try catch block finished");
}
}
}
*
\ No newline at end of file
public class thread extends Thread {
public void run() {
System.out.println("Hello! this code is running in a thread");
}
public static void main(String[] args) {
thread m = new thread();
m.start();
System.out.println("Hello! this code is running outside of the main thread");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment