title: By using multiple methods, find the perimeter of a triangle with given coordinates
body: <pre><code>import java.util.Scanner;
  public class Perimeter {
  
  
  public static void main(String[] args) {
      Scanner scan = new Scanner(System.in);
      System.out.println("Please enter X1: ");
      double X1 = scan.nextDouble();
      System.out.println("Please enter Y1: ");
      double Y1 = scan.nextDouble();
      System.out.println("Please enter X2: ");
      double X2 = scan.nextDouble();
      System.out.println("Please enter Y2: ");
      double Y2 = scan.nextDouble();
      System.out.println("Please enter X3: ");
      double X3 = scan.nextDouble();
      System.out.println("Please enter Y3: ");
      double Y3 = scan.nextDouble();
  
      finddistance(X1,Y1,X2,Y2,X3,Y3);
      double answer = triperimeter(base1, base2, base3);
      System.out.println(answer);
  
  }
  
  public static finddistance(double X1, double Y1, double X2, double Y2, double X3, double Y3){
      double base1 = Math.sqrt(Math.pow((X2 - X1),2) + Math.pow((Y2 - Y1),2));
      double base2 = Math.sqrt(Math.pow((X3 - X1),2) + Math.pow((Y3 - Y1),2));
      double base3 = Math.sqrt(Math.pow((X3 - X2),2) + Math.pow((Y3 - Y2),2));
  }
  
  public static double triperimeter(double base1, double base2, double base3){
      return (double) base1 + base2 + base3;
  }
  }
  </code></pre>
  
  <p>We are learning how to use multiple methods to write a code right now, the mistake I think I have are the following:</p>
  
  <p>In method finddistance, I need to somehow share/return variables base123 with all the methods in this code, but i don't know how to do that.</p>
  
  <p>And when I compile this code, it will give me just one error messege: invalid method declaration, return type required. On the public static finddistance line.</p>