Telegram Group 🔥🔥🔥
Get answers in minutes
Questions answered :
48
/50
Answer verified
What will be the output of the program
public class NFE
{
public static void main(String [] args)
{
String s = "42";
try
{
s = s.concat(".5"); /* Line 8 */
double d = Double.parseDouble(s);
s = Double.toString(d);
int x = (int) Math.ceil(Double.valueOf(s).doubleValue());
System.out.println(x);
}
catch (NumberFormatException e)
{
System.out.println("bad number");
}
}
}
🗓 Dec 11, 2021
votes
Andrea
🌐 India
I'm in exam, can any one give the solution for this question
votes
Courtney
🌐 India
Hello, please post an solution as well
Was your question answered?
Thanks for the feedback! ✅
Want to get famous? 📸
Answer question and get 🤩 high-lighted on our homepage.