You can make a wall of lava/water in Minecraft. Follow the simple steps below
Make a wall of any block you want that is at least 3 wide and 3 high.
Make a trench for the length of the wall.
Make another wall of the same block.
Connect the two walls with 2 rows of blocks. (NOT on the middle)
Make a row of blocks ABOVE the first 2 rows from the step above
Now place water or lava on the row from the step above.
Note
Test on creative mode first.
If you forget step 2 and/or 4 then lava/water can flow everywhere
If you forget step 5 then it will not work