You'd have to install a fitting first, or the pex would just slide off the end. FOr a quick temporary or permanent cap, a Sharkbite fitting would just slip on. Soldering on a cap would be much cheaper unless you need to buy the torch, solder, etc. to make a viable connection.