Depends on which G4...
The G3 used, if I remmember well, PC100 SDRAMs. These are compatible with all G4s running with a 100MHz system bus (aka front side bus).
This means the G4 (PCI or Yikes!), the G4 (AGP or Sawtooth) and the G4 (Gigabit Ethernet or Mystic).
The next model in the line, the G4 (Digital Audio) has a 133MHz FSB, so it needs PC133 SDRAMS.