added ex code to JavaArray