1

Uri buildUpon() is declared as abstract so how can we use it in a statement like this as its not implemented in Uri class.

Uri builtUri = Uri.parse(GITHUB_BASE_URL).buildUpon()
                .appendQueryParameter(PARAM_QUERY, githubSearchQuery)
                .appendQueryParameter(PARAM_SORT, sortBy)
                .build();
Xera12
  • 201
  • 1
  • 2
  • 9
  • `parse(url)` is not abstract and returns a concrete instance. `buildUpon()` is invoked on this instance. – davidxxx Jun 21 '17 at 06:24
  • [See here](https://stackoverflow.com/questions/19167954/use-uri-builder-in-android-or-create-url-with-variables) for buildUpon() in URI. – Vinit Yadav Jun 21 '17 at 06:26
  • parse returns a Uri, but how can we call buildUpon on it.. thats my confusion – Xera12 Jun 21 '17 at 06:27

0 Answers0