954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Character class help..

hi I know that I have asked pretty much question recently.. I'm learning java myself and hence kinda can't really understand

the isDigit method..
error is cannot resolve symbol method isDigit(char)
I imported java.lang.* as well already .

public static boolean DigitValidation(String colour)
{
boolean flag = true;

for (int i =0; i

BaileyFree
Newbie Poster
7 posts since Feb 2006
Reputation Points: 10
Solved Threads: 0
 

well, there is no isDigit method in String, which is what you're calling.
There is a static one in Character, which I guess you're thinking you're calling.
But you need to do that differently, something like Character.isDigit(ch)

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

er may I enquire how do i use character.isDigit in this place then??

BaileyFree
Newbie Poster
7 posts since Feb 2006
Reputation Points: 10
Solved Threads: 0
 

read the language documentation.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You