add } to java part