/* 9/5/2019 /* LAB 1: * Write a complete Java program that * calculates the distance * between 2 points in a plane. * You are going to need variables for * the x and y values for each point. * You should print the value inside of * the square root. * Next time we will fix to take the sqrt. */ public class TwoPointsDistance { public static void main(String[] args) { //int x1=2, x2=3, y1=4, y2=5; this is short for lines 17-21 uses initialization int x1, x2, y1, y2; x1=2; x2=3; y1=4; y2=5; System.out.println("distance is " + Math.sqrt(Math.pow(x2-x1,2.0)+Math.pow(y2-y1,2))); } }