When I make a new object, I want the constructor to randomly make a field true OR false.
I've imported the util (import java.util.Random;)
I've attempted to do stuff like this:
Which returns a NullPointerException. Help please!Code:
private boolean field;
private Random rnd
field = rnd nextBoolean();