K
K
Kairat Ibraev2021-05-04 13:04:15
Java
Kairat Ibraev, 2021-05-04 13:04:15

Java, what does a writing (Class) object mean?

I'm reading a book about Java HeadFist templates and came across this snippet WeatherData weatherData = (WeatherData) obs;What does the part after the equal sign mean? As I understand it (WeatherData) is a class, obs is an object . But why is it written like this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2021-05-04
@lunsy

This is a type cast. That's exactly how they googled it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question