Forums Register Login

doubt in this snippet

+Pie Number of slices to send: Send
public class Work1
{
public static void main(String args[])// throws Exception
{
int x =44;

System.out.println(x==x);
}
}

Hi

The output of the above code is:
true

And I want make it as: false


Rule:

1.Change any data type or anything in declaration of the variable.
2.no more changes is System.out.println statements
3.
+Pie Number of slices to send: Send
"Java Lover", please check your private messages. You can see them by clicking My Private Messages.
+Pie Number of slices to send: Send
One hint: doubles and floats have some special values that are not "real" numbers. You can find them in the Double and Float classes. Check those out.
Here. Have a potato. I grew it in my armpit. And from my other armpit, this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 584 times.
Similar Threads
True or False?......
Doubt in static...
doubts on questions #6 and #15 self-test Chapter 6
Order Of Initialization
Switch case doubt
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:29:55.