New course! Every coder should learn Generative AI!
Try a free lesson0
How to find data type of thr variable in java by using in built function
1 Answer
+ 4
whatever.getClass();
whatever instanceof String
String can be any class type though, and returns a bool.