Which statements correctly declare boolean variables? a boolean isvalid = true; b boolean isvalid = true; c boolean isvalid = new boolean (true); d boolean isvalid = 1;?
Answers
Answered by
2
this is for c#
a and b are the same?
bool is a shortcut for Boolean in c#
bool isValid = true; is correct
bool isValid = new bool(true); is not valid in c#
bool isValid = 1; is not valid in c# but you can cheese it by using
bool isValid = Convert.ToBoolean(1);
Similar questions
Math,
7 months ago
English,
7 months ago
Social Sciences,
1 year ago
English,
1 year ago
Math,
1 year ago