공부 (@Deprecated)

[Java] type: a.getClass().getName()

가비로그 2022. 1. 10. 17:56
728x90
반응형

https://stackoverflow.com/questions/2674554/how-do-you-know-a-variable-type-in-java

 

How do you know a variable type in java?

Let's say I declare a variable: String a = "test"; And I want to know what type it is, i.e., the output should be java.lang.String How do I do this?

stackoverflow.com

 

728x90
반응형