Difference between revisions of "Thread:Talk:ScalarNext/Version History/Java 8 Stack Allocation/reply"

From Robowiki
Jump to navigation Jump to search
 
(No difference)

Latest revision as of 04:32, 24 February 2018

Meanwhile, builder functions behaves the same as constructors. e.g.

Point2D.Double origin() {
  return new Point2D.Double(0, 0);
}

void stack() {
  Point2D.Double a = origin();
  a.setLocation(1, 1);
}

behaves the same as previous example.