티스토리 뷰

공부

[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

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

[Java] files  (0) 2022.01.10
[JUnit] Assert API  (0) 2022.01.10
[Java] type: a.getClass().getName()  (0) 2022.01.10
[MySQL] CREATE USER IF NOT EXISTS 'user'@'localhost' IDENTIFIED BY 'password';  (0) 2022.01.10
[MySQL] mysql -e 'source query.sql'  (0) 2022.01.10
[Java] @Slf4j; log.info("asdf")  (0) 2022.01.04
댓글
댓글쓰기 폼