Computer Applications
Which statement is correct for the method prototype given below:
int check(char ch, String s)
- check() does not return any value
- check() has return type int
- check method has two actual parameters
- check() is a constructor
User Defined Methods
9 Likes
Answer
check() has return type int
Reason — In the method prototype int check(char ch, String s), the keyword int before the method name specifies that the method returns an integer value. The parameters char ch and String s are formal parameters, and the method is not a constructor as it has a return type.
Answered By
5 Likes
Related Questions
Which of the following String methods results into boolean data type?
- trim()
- equals()
- replace()
- concat()
Which construct can be used to get only one of the required ice creams?

- switch construct
- while construct
- do.. while construct
- for construct
The Math method which returns int value is:
- round()
- cbrt()
- ceil()
- random()
What is the output of the following statement:
“MONOPOLY”.lastIndexOf(‘O’);- 1
- 3
- 2
- 5