Node node;
ArrayList<Node> toUpdate=new ArrayList<Node
time1=System.nanoTime();
try (Transaction tx = graphDb.beginTx()) {
for(int i = 1;i<=50;i++){
node = graphDb.findNode(labelPerson, "name", i);
if(node != null)
toUpdate.add(node);
}
for(int i = 0;i<toDelete1.size();i++){
toUpdate.get(i).setProperty("age", Math.random()); //SOLUTION 1 // generate a double between 0.000000 and 1.0000000
toUpdate.get(i).setProperty("age", String.valueOf(Math.random())); //SOLUTION 2 // same number but stored as a string
}
tx.success();
}
time2=System.nanoTime();