Math multiplyFull() method in Java with Examples Last Updated : 24 Apr, 2023 Comments Improve Suggest changes Like Article Like Report 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 provided and the product of both numbers expressed in long type returned by this method. Syntax: public static long multiplyFull(int x, int y)Parameters: This method accepts two Integer x, y as parameter where x and y are arguments to be multiplied. Return Value: This method returns long type value which is exact product of X * Y. Note: This method is added in JDK 9. Hence it won't run on Online IDE. Below programs illustrate the multiplyFull() method: Program 1: Java // Java program to demonstrate // multiplyFull() method of Math class public class GFG { // Main method public static void main(String[] args) { // two Integer values int a = 367428, b = 1374; // apply multiplyFull method long c = Math.multiplyFull(a, b); // print result System.out.println(a + " * " + b + " = " + c); } } Output: 367428 * 1374 = 504846072 Program 2: Multiplying two integers contains Integer.MAX values. Java // Java program to demonstrate // multiplyFull() method of Math class public class GFG { // Main method public static void main(String[] args) { // two Integer values int a = Integer.MAX_VALUE; int b = Integer.MAX_VALUE; // apply multiplyFull method long c = Math.multiplyFull(a, b); // print result System.out.println(a + " * " + b + " = " + c); } } Output: 2147483647 * 2147483647 = 4611686014132420609 Example 3: Java import java.io.*; import java.lang.Math; public class GFG { public static void main(String[] args) { int x = 200000; int y = 300000; long result = Math.multiplyFull(x, y); System.out.println("Result: " + result); } } OutputResult: 60000000000 Comment A AmanSingh2210 Follow 0 Improve A AmanSingh2210 Follow 0 Improve Article Tags : Java java-basics Java-Functions java-math Explore Java BasicsIntroduction to Java3 min readJava Programming Basics9 min readJava Methods6 min readAccess Modifiers in Java4 min readArrays in Java7 min readJava Strings8 min readRegular Expressions in Java3 min readOOP & InterfacesClasses and Objects in Java9 min readAccess Modifiers in Java4 min readJava Constructors4 min readJava OOP(Object Oriented Programming) Concepts10 min readJava Packages7 min readJava Interface7 min readCollectionsCollections in Java12 min readCollections Class in Java13 min readCollection Interface in Java4 min readIterator in Java4 min readJava Comparator Interface4 min readException HandlingJava Exception Handling6 min readJava Try Catch Block4 min readJava final, finally and finalize4 min readChained Exceptions in Java3 min readNull Pointer Exception in Java5 min readException Handling with Method Overriding in Java4 min readJava AdvancedJava Multithreading Tutorial3 min readSynchronization in Java7 min readFile Handling in Java4 min readJava Method References9 min readJava 8 Stream Tutorial7 min readJava Networking6 min readJDBC Tutorial5 min readJava Memory Management4 min readGarbage Collection in Java6 min readMemory Leaks in Java3 min readPractice JavaJava Interview Questions and Answers15+ min readJava Programs - Java Programming Examples7 min readJava Exercises - Basic to Advanced Java Practice Programs with Solutions5 min readJava Quiz1 min readJava Project Ideas For Beginners and Advanced15+ min read Like