Courseiva

UiPath-ADPv1 Generic Automation Development Practice Question

A developer needs to store a single true or false value that indicates whether an invoice was approved. The value will be used in If activities and written to a log. Which variable type should be used in UiPath Studio?

⚠ Common exam trap

The trap here is choosing String because the value is written to a log, when logging handles Boolean natively and String introduces conversion risk.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Boolean

Boolean is the precise type for a single true or false state such as invoice approval. It works directly in conditions without conversion and logs clearly. Strings and integers can represent the same idea only indirectly and permit invalid values, while Object removes compile-time type safety and forces casts, making Boolean the clean and correct choice.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Integer

    Why it's wrong here

    Integer can represent 0 and 1, but it is semantically wrong for a logical flag. Conditions would need comparisons such as equals 1, which is less readable and more error-prone than a boolean. Using Integer also allows invalid values such as 5, which have no meaning for an approval state.

  • ✗

    Object

    Why it's wrong here

    Object can hold any value, including a boolean, but it defers type checking to runtime. This sacrifices compile-time safety, requires casting before use in conditions, and can throw InvalidCastException if the stored value is not what is expected. For a simple true or false flag, Object is unnecessarily loose.

  • ✓

    Boolean

    Why this is correct

    Boolean holds exactly true or false, which is the natural type for an approval flag. It plugs directly into If and While conditions without conversion, and logging it produces a clear True or False value. This is the correct and simplest choice for a single yes-or-no state.

  • ✗

    String

    Why it's wrong here

    String stores text such as 'True' or 'False', but it is not a native boolean. Using a String in an If activity requires conversion and can produce unexpected results if casing or whitespace differs, and it invites errors such as 'true ' with a trailing space. A dedicated boolean type is more precise for a yes-or-no flag.

About these practice questions

One of 276 original UiPath-ADPv1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official UiPath exam blueprint

This UiPath-ADPv1 practice question is part of Courseiva's free UiPath certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the UiPath-ADPv1 exam.