# NOT RUN {
f <- function(i, aff) {
myArrayList <- createJavaObject("java.util.ArrayList", affinity = aff)
myArrayList$add(5, affinity = aff)
}
result <- mclapply.j4r(1:1000, f)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab