Use Collections.singleton() where ArrayList has only one element.
This has performance benefits. On my machine it's nearly twice as fast.
Showing
Please register or sign in to comment
This has performance benefits. On my machine it's nearly twice as fast.
Technounit-GROUP 2023