Which class is used to represent a connection to a URL in Java?
a) HttpURLConnection
b) URLConnection
c) HttpClient
d) HttpsURLConnection
Answer: b) URLConnection
Explanation: The URLConnection class is used to represent a connection to a URL in Java.