+ 1; } public static void main(String args[]) { A a = new A(); add1(a); } } IUUQXQIPNFTTPJDJOEJBOBFEVKTJFLXIBUJTHSBEVBMUZQJOH # add1(int) in A cannot be applied to (A) add1(a); # (Compiler)
+ 1; } public static void main(String args[]) { A a = new A(); if (false) add1(a); } } IUUQXQIPNFTTPJDJOEJBOBFEVKTJFLXIBUJTHSBEVBMUZQJOH # add1(int) in A cannot be applied to (A) add1(a);
ü 4UBUJDUZQFDIFDLJOHFOBCMFTGBTUFSFYFDVUJPOCFDBVTFUZQFDIFDLJOHOFFEOPUCF QFSGPSNFEBUSVOUJNFBOECFDBVTFWBMVFTDBOCFTUPSFEJONPSFFGGJDJFOU SFQSFTFOUBUJPOT IUUQXQIPNFTTPJDJOEJBOBFEVKTJFLXIBUJTHSBEVBMUZQJOH
EFFQJOTJEFUIBUSPVUJOF4UBUJDDIFDLJOHDBUDIFTUIFUZQFFSSPSTVQGSPOU BUUIFQPJOUXIFSFZPVDBMMFE UIFTVCSPVUJOF X 4UBUJDUZQFDIFDLJOHNBLFTZPVUIJOLNPSFTFSJPVTMZBCPVUZPVSQSPHSBNXIJDIIFMQT UPGVSUIFSSFEVDFCVHT X 8JUIEZOBNJDUZQFDIFDLJOH ZPVEPOUIBWFUPTQFOEUJNFXSJUJOHUZQFBOOPUBUJPOT IUUQXQIPNFTTPJDJOEJBOBFEVKTJFLXIBUJTHSBEVBMUZQJOH
0 } end # Prime pairs that differ from six def sexy_primes(n) (9..n).map { |i| { i - 6, i } } .select { |i| i.all? { |x| prime?(x) } } end puts sexy_primes(100_000)