From 983a371458f4c01d8c59324f92e7902ca82c45c4 Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Sun, 15 Sep 2024 21:35:00 -0500 Subject: [PATCH] Attempt p7 in Java (8) --- java/src/main/java/euler/p0007.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/src/main/java/euler/p0007.java b/java/src/main/java/euler/p0007.java index b1260534..605480f3 100644 --- a/java/src/main/java/euler/p0007.java +++ b/java/src/main/java/euler/p0007.java @@ -15,9 +15,9 @@ public class p0007 implements IEuler { @Override public Object answer() { - return Primes.primes() - .skip(10000) - .findFirst() - .orElseThrow(() -> new RuntimeException("Prime number not found")); + return (int) Primes.primes() + .skip(10000) + .findFirst() + .orElseThrow(() -> new RuntimeException("Prime number not found")); } } \ No newline at end of file