java scala mixed sample