Is Long or double : Float « Date Type « Android

Home
Android
1.2D Graphics
2.Animation
3.Core Class
4.Database
5.Date Type
6.Development
7.File
8.Game
9.Hardware
10.Media
11.Network
12.Security
13.UI
14.User Event
Android » Date Type » Float 
Is Long or double
    

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;

class Main {

    public static boolean isLong(String text) {
        try {
            new Long(text);
            return true;
        catch (NumberFormatException e) {
            return false;
        }
    }

    public static boolean isDouble(String text) {
        try {
            new Double(text);
            return true;
        catch (NumberFormatException e) {
            return false;
        }
    }
}

   
    
    
    
  
Related examples in the same category
1.Convert a float to 16.16 fixed-point representation
2.Convert a 16.16 fixed-point value to floating point
3.Random and Roundup
4.calculate NormDiff
5.DecimalFormat, Maximum Fraction Digits
6.Format Distance
7.Gives the fractional part of a number
8.Close to a value
9.Value equals in a range, and ensure value inside a range
10.scale, round Number
11.Returns the smallest power of two that is greater than
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.