Computer Applications
Identify the static method from the list given below:
- length()
- nextLine()
- substring(int)
- isLetter(char)
User Defined Methods
10 Likes
Answer
isLetter(char)
Reason — The method isLetter(char) belongs to the Character class and is a static method, meaning it can be called using the class name without creating an object. The other methods (length(), nextLine(), substring(int)) are instance methods that require an object to be invoked.
Answered By
5 Likes
Related Questions
The statement given below is termed as:
public void Accept(int a)- Method signature
- Method block
- Method prototype
- Constructor
What is the output of the following Java code?
boolean flag = false; if (flag) { System.out.println("True"); } else { System.out.println("False"); }- True
- False
- No output
- Compilation error
Which one of the following will be the output of the below statements?
String a[]={"Rohini", "Rajarshi", "Rajeev", "Rehan", "Rebecca"}; System.out.println(a[2].substring(2));- jeev
- Ra
- Raj
- je
System.out.println(Math.round(Math.ceil(-8.8)));will result in:- 8.0
- -8.0
- -9
- -8