Computer Applications
The number of values that a method can return is:
- 1
- 2
- 3
- 4
User Defined Methods
ICSE 2023
30 Likes
Answer
1
Reason — A method can return only one value.
Answered By
17 Likes
Related Questions
State the type of loop in the given program segment:
for (int i = 5; i != 0; i -= 2) System.out.println(i);
- finite
- infinite
- null
- fixed
Write a method prototype name check() which takes an integer argument and returns a char:
- char check()
- void check (int x)
- check (int x)
- char check (int x)
Predict the output of the following code snippet:
String P = "20", Q ="22"; int a = Integer.parseInt(P); int b = Integer.valueOf(Q); System.out.println(a + " " + b);
- 20
- 20 22
- 2220
- 22
The String class method to join two strings is:
- concat(String)
- <string>.joint(string)
- concat(char)
- Concat()