About 229,000 results
Open links in new tab
  1. java - Another method to multiply two numbers without using

    Jun 1, 2018 · First Method: Using a For loop. int resultat = 0; for (int i = 0; i < a; i++) { resultat += b; return resultat; Second Method: Using Recursion. if ((a == 0) || (b == 0)) return 0; else. …

  2. BigInteger multiply() Method in Java with Examples

    Apr 12, 2019 · The java.math.BigInteger.multiply (BigInteger val) is used to calculate the multiplication of two BigIntegers. As BigInteger class internally uses an array of integers for …

  3. Java Program to Multiply Two Numbers - CodeGym

    Nov 4, 2021 · In particular, the * operator is used to multiply two numbers. Java has several primitive data types that represent numbers. They differ in size, or rather, in the amount of …

  4. Java Math multiplyExact() Method - W3Schools

    The multiplyExact() method multiplies two integers and throws an exception if the result causes an overflow. This prevents incorrect results that can occur from multiplying really large numbers. …

  5. Math multiplyFull() method in Java with Examples

    Apr 24, 2023 · The multiplyFull (int x, int y) method of Math class is used to return the exact mathematical product of the two arguments. In the parameters, two integer values are …

  6. Java Arithmetic Operators with Examples - GeeksforGeeks

    Mar 28, 2023 · Multiplication (*): This operator is a binary operator and is used to multiply two operands. Syntax: Example: 4. Division (/): This is a binary operator that is used to divide the …

  7. Java Program to Multiply two Numbers - Javacodepoint

    In this article, you will learn how to write a Java program to multiply two numbers. Here, you will see multiple solutions for it such as multiplying two static numbers, multiplying two dynamically …

  8. java - Multiplying long values? - Stack Overflow

    Aug 5, 2016 · multiplies some integers together, converts it to a long and then assigns the result to a variable. The actual multiplication will be done by javac rather than when it runs. Since int …

  9. java - How do I do recursive multiplication when one or both of …

    Oct 5, 2012 · I just realized that it would be fun to make a program that could determine the product of two numbers, one or both being negative. I want to do it using recursive …

  10. Java 8 program for the multiplication of two numbers

    Nov 17, 2019 · In this example, we will see “How to perform multiplication of two numbers in Java 8?”. To achieve that, we are going to use BiFunction interface introduced in Java 8 as part of …

  11. Some results have been removed
Refresh