Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Static method reference example.
public class StaticMethodReference {
public static void main(String[] args) {
Random random = new Random();
Set<Integer> theIntSet = new HashSet<>();
for(int i = 0; i < 10;i++) {
public static class ThatClass {
public static void thatIs(int i) {
System.out.printf("That is %d%n", i);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment