This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////// Ej.1 | |
public class FizzBuzz { | |
public static void main(String[] args) { | |
if(args.length == 2) { | |
FizzBuzz fizzBuzz = new FizzBuzz(); | |
System.out.println(fizzBuzz.fizzbuzz(Integer.parseInt(args[0]), Integer.parseInt(args[1]))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////// Ej.1 | |
public class FizzBuzz { | |
public String fizzbuzz(int start, int end) { | |
if(start < 1 || end < start) { | |
throw new IllegalArgumentException(); | |
} | |
StringBuilder sb = new StringBuilder(); |