how does multiplication works in Java
Java provides several arithmetic operations that you can use in your programs.
In order to multiply numbers in Java, we will use the asterisk (*) between each number or variable
how does multiplication works in Java
Java provides several arithmetic operations that you can use in your programs.
In order to multiply numbers in Java, we will use the asterisk (*) between each number or variable
multiplication without using multiplication in java
public class SumOfElements {
public static void main(String[] args){
int[] a = {1,2,3,4,5};
int sum = sumArray(a);
int result = multiply(5,10);
}
private static int multiply(int i , int j) {
int k = 1;
int sum = 0;
while(k <= j)
{
sum = sum + i;
k++;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us