Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.graphics.Point;

public class Main {
    static public double distance(Point p1, Point p2) {
        double deltaX = p1.x - p2.x;
        double deltaY = p1.y - p2.y;
        double result = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
        return result;
    }
}