Saturday, May 11, 2019

What do you think the output will be for the following code?

Problem statement:
Can you let me know the output of the following code?
  1. public class ExecutionOne {
  2.     public static void main(String[] args) {
  3.         double d1 = 0.8;
  4.         double d2 = 0.8;
  5.         System.out.println(d1 == d2);
  6.         Double d3 = 0.8;
  7.         Double d4 = 0.8;
  8.         System.out.println(d3 == d4);
  9.     }
  10. }
Output:
true
false

No comments:

Post a Comment

How to run standalone mock server on local laptop

 Please download the standalone wiremock server from Direct download section at the bottom of the page.  Download and installation Feel fre...