I am using IntelliJ for a simmple programming on Groovy
I have made groovy class named Object:
Object.groovy:
class Object {
def value
def square
Object(Integer x){
this.value = x
}
def getSquared(){
this.square = this.value*this.value
}
}
And an scipt: first.groovy:
def x=11
def object = new Object(x)
When I run First.groovy
I am getting the following error:
Caught: groovy.lang.GroovyRuntimeException: Could not find matching
constructor for: java.lang.Object(java.lang.Integer)
at FunctionSimple.run(First.groovy:6)
--
View this message in context:
http://groovy.329449.n5.nabble.com/Caught-groovy-lang-GroovyRuntimeException-Could-not-find-matching-constructor-tp5710152.html
Sent from the groovy - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email