add java calculation