Comparison working in detail

return a.age > b.age gives value in increasinging order i.e 3, 10 ,15

but return a.name > b.name gives value in decreasding order i.e A, B, C

so what is actually correct , what does " > " and " < " sign mean

shouldn’t return a.age > b.age give value in decreasinging order like 40,30,20 because " > " symbol means greater than in math

i just want to know how the comparison works in detail for numbers and lexiographical order

Hello @Souradeep-Kundu-824545687968212,

It seems like if you have some incorrect information about character comparisons.
A,B,C is increasing order not decreasing.
Reason:
Characters are compared on the basis of their ASCII values.
image

Hope, this would help.
Give a like if you are satisfied.