You should set product
variable to be initially equal to 1 and multiply the value of product
by the input number each time the user writes a number.
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int value;
double product=1;
do
{
System.out.print("Value: ");
value = in.nextInt();
product *= value //product= product * value;
}
while (value>=0);
System.out.println("Product is: "+product);
}