Computer Applications
Which of the following returns a String?
- length()
- charAt(int)
- replace(char, char)
- indexOf(String)
Related Questions
Which of the following is a valid java keyword?
- If
- BOOLEAN
- static
- Switch
The output of the following code is:
System.out.println(Math.ceil(6.4) + Math.floor(-1-2));
- 3.0
- 4
- 3
- 4.0
Which of the following is not true with regards to a switch statement?
- checks for an equality between the input and the case labels
- supports floating point constants
- break is used to exit from the switch block
- case labels are unique
Consider the array given below:
char ch[] = {'A','E','I','O', 'U'};
Write the output of the following statements:
System.out.println(ch[0]*2);:
- 65
- 130
- 'A'
- 0