You are given two double variables , already declared and assigned values , named totalWeight, containing the weight of a shipment, and weightOfBox, containing the weight of the box in which a product is shipped. Write an expression that calculates the net weight of the product.
LANGUAGE: JAVA
CHALLENGE:
You are given two double variables , already declared and assigned values , named totalWeight, containing the weight of a shipment, and weightOfBox, containing the weight of the box in which a product is shipped. Write an expression that calculates the net weight of the product.
SOLUTION:
LANGUAGE: JAVA
CHALLENGE:
You are given two double variables , already declared and assigned values , named totalWeight, containing the weight of a shipment, and weightOfBox, containing the weight of the box in which a product is shipped. Write an expression that calculates the net weight of the product.
SOLUTION:
totalWeight – weightOfBox
Posted in Java, Learn To Code