Convert pine script to java

Job ID: 34108131

Budget: $240 – $2,000 HKD

convert the following to java

fastPeriod = input(defval =17, title = "DEMA FAST Period", minval = 2)
slowPeriod = input(defval = 9, title = "DEMA SLOW Period", minval = 1)
res = input(title="Resolution - not lower than chart", type=resolution, defval="165")

demaFast = security(tickerid, res, 2 * ema(close, fastPeriod) - ema(ema(close, fastPeriod), fastPeriod) )
demaSlow = security(tickerid,res, 2 * ema(close, slowPeriod) - ema(ema(close, slowPeriod), slowPeriod) )