Consider Below Html
<html>
<body>
<input type ="text" id="username">
</body>
</html>
so Absoulte path= html/body/input and Relative path = //*[@id="username"]
Disadvantage with Absolute xpath is maintenance is high if there is nay change made in html it may disturb the entire path and also sometime we need to write long absolute xpaths so relative xpaths are preferred