Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8173848

JShell: less-than causes: reached end of file while parsing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • tools
    • b156
    • Verified

        jshell> 45
        $1 ==> 45

        jshell> 72
        $2 ==> 72

        jshell> if ($1 < $2) {
           ...> System.out.printf("%d < %d%n", $1, $2);
           ...> }
        45 < 72

        jshell> $1 < $2
        | Error:
        | reached end of file while parsing
        | $1 < $2
        | ^

        $1 > $2

        WORKS and returns

        $3 ==> false

        jshell> 3 < 4
        $1 ==> true



              rfield Robert Field (Inactive)
              rfield Robert Field (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: