हिंदी

What is the method to check whether a character is a letter or digit? - Computer Applications

Advertisements
Advertisements

प्रश्न

What is the method to check whether a character is a letter or digit?

विकल्प

  • isDigif(char)

  • isLetterOrDigit()

  • isLetterOrDigit(char)

  • isLETTERorDIGIT(char)

MCQ
Advertisements

उत्तर

isLetterOrDigit(char)

Explanation:

isLetterOrDigit() determines whether a character is a letter, digit, or none of the above.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2023-2024 (March) Official

संबंधित प्रश्न

State the number of bytes occupied by char and int data types.


Write a difference between the functions isUpperCase() and toUpperCase().


int res = ‘A’; 

What is the value of res?


Write the return data type of the following function:

log( )


State one difference between the floating point literals float and double.


Design a class to overload a function area( ) as follows:
(i) double area (double a, double b, double c) with three double arguments, returns the area of a scalene triangle using the formula:

area = `sqrt ("s" ("s" - "a")("s" - "b")("s" - "c"))  "2ab"`

where `"s" = ("a" + "b" + "c")/2`

(ii) double area (int a, int b, int height) with three integer arguments, returns the area of a trapezium using the formula:

area = `1/2` height (a+b)

(iii) double area (double diagonal 1, double diagonal 2) with two double arguments, returns the area of a rhombus using the formula :

area = `1/2` (diagonal 1 × diagonal 2)


Predict the output of the following code snippet: String P = "20", Q = "22";

int a = Integer.parseInt(P);

int b = Integer.value0f(Q);

System.out.println(a + " " + b);


Write the value of n after execution:

char ch = 'd';
int n = ch + 5;

The method to convert a lowercase character to uppercase is ______.


A student is trying to convert the string present in x to a numerical value, so that he can find the square root of the converted value, However the code has an error. Name the error (syntax/logical/runtime). Correct the code so that it compiles and runs correctly.

String x="25";
int y=Double.parseDouble(x);
double r=Math.sqrt(y);
System.out.println(r);

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×