Is there something like python's interactive REPL mode, but for Java?

前端 未结 28 1150
一个人的身影
一个人的身影 2020-11-29 16:38

Is there something like python\'s interactive REPL mode, but for Java? So that I can, for example, type InetAddress.getAllByName( localHostName ) in a window, a

28条回答
  •  离开以前
    2020-11-29 16:57

    Jython is a python implementation which lets you inspect and interact with Java objects.

    >>> from java.net import *
    >>> InetAddress.getAllByName("google.com")
    array(java.net.InetAddress,[google.com/209.85.171.100, 
                                google.com/74.125.45.100,
                                google.com/74.125.67.100])
    

提交回复
热议问题