Convert Integer to String:
- String.valueOf(int);
- Integer.toString(int);
Convert String to Integer:
- Integer.parseInt(string);
- Integer.valueOf(string);
- int x = new Integer(string);
Convert String to Double:
- Double.parseDouble(string);
- double x = new Double(string);
Convert Double to String:
- String.valueOf(double);
Convert Double to Integer:
- int x = (int)(double);
Convert Integer to Double:
- double x = (double)(int);
No comments:
Post a Comment