Update Rule.java

Created the rowOrColNum method.