Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use isDigit()

 
Arash Ashl
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can someone guide me please on how to use this method?

boolean isDigit(char ch)
http://docs.oracle.com/javase/tutorial/java/data/characters.html

I tried to use it as the link I mentioned says it! but I guess I don't know how to use methods correctly yet!




and also this line of code:

 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15279
39
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you are writing in line 9 of the first snippet and line 12 of the second snippet is not valid Java syntax.

Note that the methods isDigit() and toUpperCase() are static methods of class Character. You must call them on class Character:

 
Arash Ashl
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm thanks for the answers
I'll be thinking about them
I still has to study and learn some terms...
we'll be back with some questions
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic