Write a Java method to find all twin prime numbers less than 100.

Source Code:

public class TwinPrimes {
public static void main(String[] args) {
findTwinPrimes();
}

public static boolean isPrime(int n) {
if (n <= 1) return false;
for (int i = 2; i < n; i++) {
if (n % i == 0) return false;
}
return true;
}

public static void findTwinPrimes() {
for (int i = 2; i < 100; i++) {
if (isPrime(i) && isPrime(i + 2)) {
System.out.println("(" + i + ", " + (i + 2) + ")");
}
}
}
}

Output: