Can i upgrade my mid 2012 macbook pro to use DDR4 ram ?
No, the Mid-2012 MacBook Pro is in no way upgradable to DDR4 RAM.

To use DDR4 RAM a lot of things must be compatible with DDR4 - one of those is the CPU itself. The Intel CPU in the mid-2012 MacBook Pro does not support DDR4 RAM.

And no, DDR4 was not around in mid-2012. It was released to the market in 2014.