String str = String.format("Action %s occured on object %s.", objectA.getAction(), objectB);
Or
String str = String.format("Action %s occured on object %s with outcome %s.", new Object[]{objectA.getAction(), objectB, outcome});
You can also use numeric positions, for example to switch the parameters around:
String str = String.format("Action %2$s occured on object %1$s.", objectA.getAction(), objectB);