Programming In Java Programming in JAVAQ1:--Solution-- public class Question1 extends Thread{ public void run(){ System.out.print("Thread is Running."); }Copy textQ2: --Solution-- static void swap(Question q) { int temp; temp = q.e1; q.e1 = q.e2; q.e2 = temp; }Copy textQ3: --Solution-- t1.setName("SET -II : Q3"); t2.setName("SET -II : Q3 New");Copy textQ4:--Solution-- class Point { double x,y; double distance(Point p1,Point p2) { double res; res = Math.sqrt(Math.pow((p2.x - p1.x),2) + Math.pow((p2.y - p1.y),2)); System.out.print(res); return res; } }Copy textQ5:--Solution-- double total=0.0,count=0.0; for(int i=0;iCopy text