Yes. When canned goods are processed, they are placed in the can, sealed, and THEN boiled/heated for preservation. That is why some canned vegetables are overcooked (think carrots, green beans), as compared to fresh or frozen vegetables.

Yes. They're cooked right in the can, like beans. They put raw lentils in the cans, then seal them, then run them through a boiling water bath to sterilize them inside, and in the process the lentils are cooked.