+ 2

Boiling Water :- What am I missing here?

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int temp = sc.nextlnt(); if(temp>=100) { System.out.println("Boiling"); }else{ System.out.println("Not boiling"); } } }

29th May 2023, 1:14 PM
Death Beliver
Death Beliver - avatar
2 Answers
+ 12
You're missing something here sc.nextlnt It should be sc.nextInt The difference is hard to spot but you used lowercase (L) instead of uppercase (i)
29th May 2023, 1:39 PM
Mirielle
Mirielle - avatar
+ 1
Mirielle Wow! You have a really quick eye! 🛐😁
30th May 2023, 11:19 AM
Евгений
Евгений - avatar