The first glass of water was given an amount of heat of 1 J, and the second glass of water was lifted upwards

The first glass of water was given an amount of heat of 1 J, and the second glass of water was lifted upwards, having completed the work of 1 J. How did the internal energy of water change in the first and second cases?

In the first glass, the energy has increased, in the second, it has not changed.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.