The Water Jug Puzzle-Brain teaser

Riddle

You have a 5-liter jug and a 3-liter jug. Neither has any markings on it. How can you measure exactly 4 liters using these jugs?

    1. Fill the 5-liter jug to the top. 2. Pour water from the 5-liter jug into the 3-liter jug until it is full. This leaves you with 2 liters in the 5-liter jug. 3. Empty the 3-liter jug and pour the 2 liters from the 5-liter jug into the 3-liter jug. 4. Fill the 5-liter jug again and pour it into the 3-liter jug until it is full. Now you have exactly 4 liters left in the 5-liter jug.