Question: In Java, Thanks.import java.util.Scanner; import java.io . * ; import java.util. * ; public class dufus { / / 1 public static void main (

In Java, Thanks.import java.util.Scanner;
import java.io.*;
import java.util.*;
public class dufus
{//1
public static void main(String[] args)
{//2
int x;
int y;
Scanner input=new Scanner(System.in);
System.out.println("Please enter a number: ");
x=input.nextInt();
System.out.println("Please enter another number: ");
y=input.nextInt();
System.out.println("Your first number was: "+ x);
System.out.println("");
System.out.println("Your second number was: "+ y);
System.out.println(product(x, y));
}//2
}//1
I cant figure out whats wrong with this code. Its supposed to accept two integers from the user and return the product using recusive method. Can you help?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!