The output of the program is correct. If you move the display() into Child's class, the output will be 100. The reason is when the Child's class instance is created it inherits both x-- from the Child Class and from the Parent class. That being said, since display() method is in the Parent class, it will access the x-- the one which is present in the Parent class--not from the Child's class.
With regards to data hiding(encapsulation), the concept is related to access modifiers--coderanch, protected, default, private. In other words, if you assign a "private" access modifier to "int x", then the 'x' can not be accessed from any other class. Here one point is notable: when a class inherits any other class, the inherited class gets all the behaviors and properties of its parent class.