Loading...
Give the output of the following Character class methods:
Give the output of the following String class methods:
Define a class to accept a String and print the number of digits, alphabets and special characters in the string. Example: S = “KAPILDEV@83” Output: Number of digits – 2 Number of Alphabets – 8 Number of Special characters – 1
The output of the statement "talent".compareTo("genius") is:
What is the method to check whether a character is a letter or digit?
The following code to compare two strings is compiled, the following syntax error was displayed – incompatible types – int cannot be converted to boolean. Identify the statement which has the error and write the correct statement. Give the output of the program segment. void calculate() { String a = "KING", b = "KINGDOM"; boolean x = a.compareTo(b); System.out.println(x); }
© 2026 PadhAiPro. This question is provided for educational purposes.