I'm not sure what are you trying to do with this,
public SomeClass(){
new SomeClass(r.nextInt(5));
}
but I suspect the correct syntax (if you want to call the other constructor) is
public SomeClass(){
this(r.nextInt(5));
}
You should post the code of the outside class to understand your problem.