Assuming that both cans are made of the same material and thickness, the black can would end up hotter than the silver can when exposed to sunlight. This is because black surfaces absorb more light and heat than light surfaces, while silver surfaces reflect more light and heat.
When sunlight falls on a black surface, most of the light is absorbed and converted into heat, while very little is reflected. This means that the black can would absorb more heat from the sun and become hotter than the silver can. On the other hand, when sunlight falls on a silver surface, most of the light is reflected and very little is absorbed. This means that the silver can would reflect more heat from the sun and remain cooler than the black can.
This principle is used in many applications, such as in solar panels. The solar panels are usually made with black surfaces to maximize the amount of sunlight absorbed and converted into electricity. Similarly, reflective surfaces are used to keep buildings cool by reflecting sunlight and reducing heat absorption.