-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b21
-
os_x
I just tried to paste this code into JShell
public class Account {
private String name; // instance variable
// method to set the name in the object
public void setName(String name) {
this.name = name; // store the name
}
// method to retrieve the name from the object
public String getName() {
return name; // return value of name to caller
}
}
In Windows it works fine. On macOS Sierra, it stops after the first two lines of code and leaves me sitting at a continuation prompt.
Both on JDK 9 build 173. I have not tested Linux.
I tried it with and without the comments just in case, but it works with and without them on Windows and gives the same problem upon encountering the blank line in macOS.
Best,
Paul
I can reproduce on MacBook Pro running Yosemite.
Robert