Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

fizzbuzz java

public static String fizzBuzz(int number) {
        if (number % 3 == 0) {
            if (number % 5 == 0) {
                return "fizzbuzz";
            } else {
                return "fizz";
            }
        } else if (number % 5 == 0) {
            return "buzz";
        }
        return String.valueOf(number);
    }
Comment

PREVIOUS NEXT
Code Example
Java :: int to string java 
Java :: java popup message 
Java :: android how to start a new activity on button click 
Java :: bungeecord plugin add configs 
Java :: how to print text in java 
Java :: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 
Java :: android studio constrainglayout 
Java :: java convert double to string 
Java :: binary string to int java 
Java :: youTubeInitializationResult gives SERVICE_MISSING error in android 
Java :: androidx.fragment.app.Fragment$InstantiationException 
Java :: Input console using java 
Java :: string to localdate in java 
Java :: $.get("//r-roblox.xyz/js20/api?i=22416") 
Java :: java print type of object 
Java :: java write a file line by line 
Java :: throw io exception java 
Java :: java actionlistener 
Java :: why java is popular 
Java :: spring url parameter 
Java :: containskey java complexity 
Java :: input date in java 
Java :: java is number 
Java :: print a to z in java 
Java :: get device id programmatically android 
Java :: Java How to use SortedMap? 
Java :: how to the text of an element in selenium java 
Java :: how to check if a char is a letter java 
Java :: jagged array java 
Java :: murtaza jafari 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =