assert expression;or
assert expression : errorMessage;Example:
int age = 20; assert age>18 : "Age must be above 18";If the condition is false, it throws an error with the message.
If vector \( \mathbf{a} = 3 \hat{i} + 2 \hat{j} - \hat{k} \) \text{ and } \( \mathbf{b} = \hat{i} - \hat{j} + \hat{k} \), then which of the following is correct?