Program to convert Roman Numerals to Numbers
import java . util . Map ; import java . util . HashMap ; class GFG { private static final Map < Character , Integer > roman = new HashMap < Character , Integer > ( ) { { put ( ' I ' , 1 ) ; put ( ' V ' , 5 ) ; put ( ' X ' , 10 ) ; put ( ' L ' , 50 ) ; put ( ' C ' , 100 ) ; put ( ' D ' , 500 ) ; put ( ' M ' , 1000 ) ; } } ;