Want more features on Pastebin? Sign Up, it's FREE!
Guest

Crazy Short Circuiting Decompiled

By: a guest on Apr 7th, 2013  |  syntax: Java  |  size: 1.64 KB  |  views: 91  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public class Test
  2. {
  3.     Test() {
  4.         super();
  5.     }
  6.    
  7.     public static void main(String[] args) {
  8.         System.out.println("Please enter values:");
  9.         final Scanner in = new Scanner(System.in);
  10.         double largest = Double.NEGATIVE_INFINITY;
  11.         double smallest = Double.POSITIVE_INFINITY;
  12.         while (true) {
  13.             final double nextDouble = in.nextDouble();
  14.             final double input = nextDouble;
  15.             if (nextDouble != 0.0) {
  16.                 if (input > largest) {
  17.                     final double num = input;
  18.                     largest = num;
  19.                     if (num != input) {
  20.                         continue;
  21.                     }
  22.                 }
  23.                 if (input < smallest) {
  24.                     final double num2 = input;
  25.                     smallest = num2;
  26.                     if (num2 != input) {
  27.                     }
  28.                 }
  29.             }
  30.             else {
  31.                 if (largest != Double.NEGATIVE_INFINITY) {
  32.                     break;
  33.                 }
  34.                 final double num3 = 0.0;
  35.                 largest = num3;
  36.                 if (num3 != 0.0) {
  37.                     break;
  38.                 }
  39.                 final double num4 = 0.0;
  40.                 smallest = num4;
  41.                 if (num4 == 0.0) {
  42.                     break;
  43.                 }
  44.             }
  45.         }
  46.         in.close();
  47.         System.out.println(new StringBuilder().append("The smallest value was ").append(smallest).toString());
  48.         System.out.println(new StringBuilder().append("The largest value was ").append(largest).toString());
  49.     }
  50. }
clone this paste RAW Paste Data