is it possible to have default gateway of different subnet from IP?

Like IP: 192.168.0.154
G/W: 192.168.16.1


will it work? please explain in both cases


Thanks in advance.