printInt works with literal integer, but not with variable