美文网首页
Property/Variable Type Discovery

Property/Variable Type Discovery

作者: ccphantom | 来源:发表于2017-11-01 02:34 被阅读0次

    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

    相关文章

      网友评论

          本文标题:Property/Variable Type Discovery

          本文链接:https://www.haomeiwen.com/subject/safwpxtx.html