package com.aimtocode.multithreading; class MyThread extends Thread{ public void run(){ System.out.println("My thread is in running state."); } } class ThreadJoinDemo{ public static void main(String args[]){ MyThread obj=new MyThread(); obj.start(); try { obj.join(); } catch(InterruptedException e) { } System.out.println(“Thread-Join Demo Complete”); } } }