Use HttpUrl.
Say you already have a String url ready, just want to append the queries:
HttpUrl url = HttpUrl.parse("http://www.google.com/search").newBuilder()
.addQueryParameter("q", "cat videos")
.build();
For the details about query parameters, see Vitaly's answer, or refer to the documentation.