Here's a Java program that implements the equation:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter age (years): ");
double age = scanner.nextDouble();
System.out.print("Enter weight (pounds): ");
double weight = scanner.nextDouble();
System.out.print("Enter heart rate (beats per minute): ");
double heartRate = scanner.nextDouble();
System.out.print("Enter time (minutes): ");
double time = scanner.nextDouble();
double calories = ((age * 0.2757) + (weight * 0.03295) + (heartRate * 1.0781) - 75.4991) * time / 8.368;
System.out.printf("Calories: %.2f calories\\", calories);
}
}