spock - How to call a method from another class in groovy? -
For example, I have a class like this:
first class {.. DF A () {}} Class SecondOn {// I already have to call Method A from class and use one I also if I try to follow Java like call I still get error First one method = new first one (); // method.A ()}
I have already tried but no way. Any suggestions or examples will be really helpful.
I will not see any problem in:
class first one {Def a () {println "a"}} Second one {DEF (B) (New First On). A () println "b"}} New First First () A () println ("") new seconds (). B ()
Output:
aab
Comments
Post a Comment