use Promise instead of Future in java example
Merge pull request #1418 from yanns/patch-1

use Promise instead of Future in java example