--

Yes. IntelliJ IDEA will actually let you place classes in `java.util`, and then you can write things like

```

package java.util;

public class Example {

public static void main(String[] args) {

Random random = new Random();

int num = random.next(-3);

}

}

```

It didn't take much prompting for IntelliJ to suggest `next( )` for this toy example.

My point isn't that this kind of thing has actually happened with `java.util.Random`, but that there isn't something to prevent it from happening other than common sense and good taste.

--

--

Alonso Del Arte
Alonso Del Arte

Written by Alonso Del Arte

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified

Responses (1)