I was doing some past papers on my exam and I came accross this question :
What does (String) do on line 5 and what is this type of expression called?
Here is line 5 : String str = (String) D.dequeue ();
My guess is that it's veryfing if the value we get from D.dequeue()
is a String
though I am not sure.