while the code in java sometimes i wanted to use signed integer type. but like C++ coudn't find a way to use signed int. so thought about a way to convert negative integers to positive.
now just use integerVariable as your wish. it will only contain positive values.
int integerVariable;
integerVariable =-20;
//now convert negative values to positive
if(integerVariable<0)
integerVariable=0-integerVariable;
now just use integerVariable as your wish. it will only contain positive values.