Help! I keep getting an error message at line 23 that says else is not a statement. What should I change or how do I fix this?
Thanks!
package en.codegym.task.pro.task03.task0301;
import java.util.Scanner;
/*
Warm or cold
*/
public class Solution {
public static void main(String[] args) {
String cold = "It's cold outside";
String warm = "It's warm outside";
//write your code here
int temperature = 0;
Scanner input = new Scanner(System.in);
int temperature = input.nextInt();
//int temperature = 50;
if (temperature < 0) {
System.out.println(cold);
else (temperature >= 0) {
System.out.println(warm);
}
}
}
}