Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

dividing numbers using method


public class Sample {
    public static void main(String[] args) {
        float result = divide(30, 5);
        System.out.println(result);
    }

    // method to calculate
    static int divide(int num1, int num2) {
        return num1 / num2;
    }
}
 
PREVIOUS NEXT
Tagged: #dividing #numbers #method
ADD COMMENT
Topic
Name
8+3 =