Tag - return type function in java