java - What is the purpose of adding a positive variable? -
this question has answer here:
i in java1 semester, , asked teacher question, not answer, because didn't know why. or rather couldn't think of purpose serve.
let that, when setting variables a=5 , b=-4. , wanted know value of a+b set system.out.println.
i a + b, a + + b, means add positive b. although b negative positive variable still negative 4.
however, if change equation a - - b, should come out b being positive 4.
so question, purpose of creating equation positive variable if positive variable, variable.
since opposite valid (adding negative such + - b) sign plus doesnt affects value.
Comments
Post a Comment