Q:

why am i not able to get the return value of -1 when the condition is not met?

why am i not able to get the return value of -1 when the condition is not met?
package calcfeetandinchestocm;

public class Calcfeetandinchestocm {

    public static void main(String[] args) {
        calcFeetAndInchesToCentimeters(4, 12);

        calcFeetAndInchesToCentimeters(-0.5);
    }

    public static int calcFeetAndInchesToCentimeters(double feet, double inches) {

        if (feet >= 0) {
            System.out.println("feet are " + feet + \
                               " and its equal centimeters are " + feet * 12);

        }

        if (inches >= 0 && inches <= 12) {
            System.out.println("inches are " + inches + \
                               "and its equal centimeters are " + inches * 2.45);
        }

        return -1;
    }

    public static int calcFeetAndInchesToCentimeters(double inches) {
        if (inches >= 0) {
            System.out.println("inches are " + inches + \
                          "and its equal centimeters are " + inches * 2.45);
        }
        return -1;
    }

}

A:

You have to set a variable equal to the function or do a system out print with the function as it's argument like:
System.out.print(calcFeetAndInchesToCentimeters(4, 12));

or
x = calcFeetAndInchesToCentimeters(4, 12);
System.out.print(x);

