This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to use isDigit() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to use isDigit()" Watch "How to use isDigit()" New topic
Author

How to use isDigit()

Arash Ashl
Greenhorn

Joined: Mar 04, 2013
Posts: 9
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

Joined: Aug 16, 2005
Posts: 14074
    
  16

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:


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Arash Ashl
Greenhorn

Joined: Mar 04, 2013
Posts: 9
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
 
 
subject: How to use isDigit()
 
Similar Threads
Charset and encoding to chinese
Array element
doubt on char default value...
please explain the reason behind the output of this code
Char default value - Enthuware question