{
println("\nSetting the CompoundCursor Position and Getting the " +
"Current Values");
CompoundCursor rootCursor = (CompoundCursor) queryCursor;
ValueCursor baseValueCursor = rootCursor.getValueCursor();
List outputs = rootCursor.getOutputs();
ValueCursor output1 = (ValueCursor) outputs.get(0);
ValueCursor output2 = (ValueCursor) outputs.get(1);
int pos = 5;
rootCursor.setPosition(pos);
println("CompoundCursor position set to " + pos + ".");
println("The current position of the CompoundCursor is " +
rootCursor.getPosition() + ".");
println("Output 1 position is " + output1.getPosition() +
", value = " + output1.getCurrentValue());
println("Output 2 position is " + output2.getPosition() +
", value = " + output2.getCurrentValue());
println("VC position is " + baseValueCursor.getPosition() +
", value = " + baseValueCursor.getCurrentValue());
}