Sha256: ed3efb183c351baaa536607a3a71e02774534867397d6b680ba5bb4250a91435

Contents?: true

Size: 460 Bytes

Versions: 123

Compression:

Stored size: 460 Bytes

Contents

public class Raindrops {

    public static String convert(int number) {
        String result = "";

        if (number % 3 == 0) {
            result += "Pling";
        }

        if (number % 5 == 0) {
            result += "Plang";
        }

        if (number % 7 == 0) {
            result += "Plong";
        }

        if (result == null || result.isEmpty()) {
            result = Integer.toString(number);
        }

        return result;
    }
}

Version data entries

123 entries across 123 versions & 1 rubygems

Version Path
trackler-2.0.8.22 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.21 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.20 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.19 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.18 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.17 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.16 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.15 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.14 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.13 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.12 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.11 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.10 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.9 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.8 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.7 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.6 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.5 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.4 tracks/java/exercises/raindrops/src/example/java/Raindrops.java
trackler-2.0.8.3 tracks/java/exercises/raindrops/src/example/java/Raindrops.java