Wednesday, September 4, 2013

Selenium : Check Variable Type

Selenium : Check Variable Type


class Typetester 
 {
    void printType(byte x) {
        System.out.println(x + " is an byte");
    }
    void printType(int x) {
        System.out.println(x + " is an int");
    }
    void printType(float x) {
        System.out.println(x + " is an float");
    }
    void printType(double x) {
        System.out.println(x + " is an double");
    }
    void printType(char x) {
        System.out.println(x + " is an char");
    }
}
 
 
 
Then:
 

Typetester t = new Typetester();
t.printType( yourVariable );
 

No comments:

Post a Comment