Appium - Get X and Y Co-Ordinates of an Element in Appium

import org.openqa.selenium.Point;

public static int getXcord(WebElement element)
    {
        Point point = element.getLocation();
        
        int xcord = point.getX();
        
        return xcord;
    }
    
    public static int getYcord(WebElement element)
    {
        Point point = element.getLocation();
        
        int ycord = point.getY();
        
        return ycord;
    }