'How to implement with hibernate criteria Object for simple inner join

how to implement below simple table inner join quarry using hibernate criteria object in java

SELECT *
FROM a.tableA as a
INNER JOIN a.TableB as b
ON a.id = b.Val;


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source