The United States has strict codes relating to home wiring, including clearly defined colors on the outer casing of the wires. Black means hot, white signifies neutral, and green indicates ground. However, if you need to rewire a light switch or a plug socket, you may occasionally come across two black wires. It’s essential that you determine which black wire is hot before proceeding. The easiest and safest way is to use a multimeter to test for current.
Don a pair of protective rubber gloves before testing to find out which black wire is hot. You may accidentally touch a hot wire and get an electric shock.
Place the prong of the multimeter's black wire on the bare metal on the end of a white wire, then read the meter. If you get a reading, the black wire is hot; if you don't, the black wire isn't hot.