I can\'t figure out why it\'s always returning the value of arg1. I\'m building a weight converter.
public double convert(double arg1,int arg2,int arg3) { //
Other than using break, using return statements does the trick as well as it also prevents falling through cases.
break
return
case 2: switch(arg3) { // if ounce case 0: return (arg1 * milligram) / milligram;