Drive shaft u joints: try to move the drive shaft back and forth looking for lateral play in the joint. Then quickly rotate it slightly back and forth looking at the joint for any play.
Axle u joints look for caps spinning. Not much you can do to check them. Maybe move the tire slightly back and forth to see if there is any slop in the u joint.
Axle u joints will usually make noise in 4wd if they are bad.
Drive shaft u joints will usually start vibrating at hiway speeds if they are bad.