Canned foods

Hello everyone. Is it ok to eat canned foods like black beans, kidney beans etc?