Hello, I was studying HTTP Requests in Java when I came across a code and on a certain line there was a somewhat strange statement for me, can anyone explain to me what a type means before a statement?
HttpURLConnection connection = null;
URL url = new URL(targetURL);
connection = (HttpURLConnection) url.openConnection(); //Esta declaração
Sorry for ignorance on the subject, but can anyone explain to me why HttpURLConnection type before the rest of the designation? Thank you!