티스토리 뷰

공부

[Java] Dynamic cast in generic

승가비 2021. 11. 8. 20:08
728x90
value = value.getClass().cast(val);

https://stackoverflow.com/questions/3939054/dynamic-casting-in-java

 

Dynamic casting in Java

Before I get chided for not doing my homework, I've been unable to find any clues on the multitude of questions on Java generics and dynamic casting. The type Scalar is defined as follows: public...

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[MySQL] DATE_FORMAT(date, '%Y-%m-%d')  (0) 2021.11.08
[Java] Call static generic method  (0) 2021.11.08
[Java] Stream GroupBy  (0) 2021.11.05
What is the purpose of List<?> if one can only insert a null value?  (0) 2021.11.05
[HDFS] hdfs dfs rm -r  (0) 2021.11.05
댓글