Property/Variable Type Discovery

2017-11-01  本文已影响0人  ccphantom

You may need to find the type of property or variable you are working with to determine the functions you can execute against it, or to make sure comparisons are with equivalent types of data. This code is meant to be executed in the scratchpad.

Input:

props['p.myProperty1']=true props['p.myProperty2']='12345' props['p.myProperty3']=12345

Code to run in Scratch pad:

props['p.myProperty1'].getClass().getName() 
props['p.myProperty2'].getClass().getName() 
props['p.myProperty3'].getClass().getName()

Results:

image.png image.png
image.png
上一篇下一篇

猜你喜欢

热点阅读