? and : are conditional operators in java. They are used as shown below.
variable = (boolean expression) ? true part : false part
variable = (boolean expression) ? true part : false part
e.g
c= ( a>b ) ? a : b;
It means
if (a>b)
c =a;
else
c=b;
No comments:
Post a Comment