Question: help me with this java code Write a call to the method minTemperature so that the println statement will not generate a syntax error. import
help me with this java code
Write a call to the method minTemperature so that the println statement will not generate a syntax error. import java.util.Scanner; public class FinalTest {
public static void main (String args[]) { Scanner keyboard = new Scanner(System.in); int minTemp, temperatures[] = {10, 35, 15}; String scale = keyboard.nextLine(); // call to area here System.out.println("Low temperature is " + minTemp); } public static int minTemperature(int temp[], String metric) { int min = temp[0]; for (int i = 1; i < temp.length; i++) if (temp[i] < min) min = temp[i]; if (metric.equals("f")) return min else return min - 32; }
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
