In: Computer Science
Which is NOT a valid return type for a method declaration
Select one:
a. double
b. char
c. null
d. String
e. boolean
f. float
g. int
h. void
Statements that allow a program to choose, based on a boolean expression, between alternative blocks of code are known as:
Select one:
a. Selection statements or Conditionals
b. Declarations
c. Methods
d. Repetition Statements or Loops
e. Composition
ans 1 == the right option is -- option h...
because void means null or not return anything.. basically void use with the method declaration ..
ill elaborate all options -- i- double - is a primitive data type
ii - char is also primitive data type
iii) - null means nothing or null value .
iv ) - String is a mutuable non primitivr data type
v) - float is a primitive data type
vi ) - int is a primitive data type
ans B ---
answer is option a --
Selection statements or Conditionals
these staments return result as a boolean value ...
for example - if condition statement - return the true or false [Boolean]
othere options are --
b - Declaration -- this is when we declare variable such as - int a ;
c -Methods - are the block of code .
d- Repetition Statements or Loops = are use to repeat a number of lines multiple times ..
e - Composition is provide the has-a relationship in classes...
hey there ! i am done ,, Please give me a like to appreciate my work and efforts...
Thank You ! Dont forget to like the code ...