Write a Java method that returns true if and only if a character is a digit or a letter. The method should display appropriate feedback to the console.

What will be an ideal response?


```
public boolean isDigitOrLetter(Character c)
{
if(c.isDigit(c.charValue()) || c.isLetter(c.charValue()))
{
System.out.println("Returning true");
return true;
}
else
{
System.out.println("Returning false");
return false;
}
}
```

Computer Science & Information Technology

You might also like to view...

Method ToString is not a member of class:

a) String b) Object c) StringBuilder d) None of the above

Computer Science & Information Technology

On Google+, photos larger than ________ pixels will be automatically resized when uploaded

A) 256 x 256 B) 512 x 512 C) 1024 x 1024 D) 2048 × 2048

Computer Science & Information Technology

In Excel, pressing ____ has the same effect as pressing the right arrow key.

A. [Num Lock] B. [Space] C. [Tab] D. [Enter]

Computer Science & Information Technology

The Windows Explorer program navigates the Internet.

a. true b. false

Computer Science & Information Technology