+ 3

Where is the error

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"); } } }

26th Dec 2022, 9:33 AM
Muhammad Hamza
Muhammad Hamza - avatar
11 Answers
+ 2
Avinesh got it boiling b was in capital letters so that's why the error in else statement , thanks btw
26th Dec 2022, 10:24 AM
Muhammad Hamza
Muhammad Hamza - avatar
+ 3
It should be capital "i". Just copy the below. sc.nextInt();
26th Dec 2022, 10:02 AM
Avinesh
Avinesh - avatar
+ 2
https://code.sololearn.com/c6RDmh4032a1/?ref=app Here is the code. nextInt is short form for nextInteger.
26th Dec 2022, 10:11 AM
Avinesh
Avinesh - avatar
+ 1
Avinesh copied your program but still can't complete my practice problems,it says half of my test case are false .
26th Dec 2022, 10:20 AM
Muhammad Hamza
Muhammad Hamza - avatar
0
sc.nextInt(); After next, that is capital "i" and not lowercase "l".
26th Dec 2022, 9:58 AM
Avinesh
Avinesh - avatar
0
Avinesh it doesn't resolve even after small i
26th Dec 2022, 10:00 AM
Muhammad Hamza
Muhammad Hamza - avatar
0
Avinesh half issue resolved , now there is some prob in else half I guess ,And can you tell why do we have to write I in capital?
26th Dec 2022, 10:08 AM
Muhammad Hamza
Muhammad Hamza - avatar
0
This program is in introduction to java ,conditionals.
26th Dec 2022, 10:11 AM
Muhammad Hamza
Muhammad Hamza - avatar
0
What's wrong in my program
26th Dec 2022, 10:13 AM
Muhammad Hamza
Muhammad Hamza - avatar
0
Can you please share the link of your program in which you want help. That will be easy for the helpers to get the error.
27th Dec 2022, 4:02 AM
Sanya Sanskriti
Sanya Sanskriti - avatar
0
nextlnt(). Error in "l"
27th Dec 2022, 7:50 PM
Протухшая Антилопа
Протухшая Антилопа - avatar