java - Is it a good programming practice to use Class.cast() method instead of (Class) casting? -


this question has answer here:

is programming practice use class.cast() method instead of (class) casting?

what pros , cons of 2 approaches. pitfalls of both of them?

i think (class) casting easier understand rather class.cast(). when using ide java eclipse, ide prefer generating (class) casting, way faster approach in coding.


Comments

Popular posts from this blog

c++11 - Intel compiler and "cannot have an in-class initializer" when using constexpr -

rest - Spring boot: Request method 'PUT' not supported -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -