URL in java api

Is there any way to find out what URL is formed when hitting queries using java api.