0

Java Servlets: Why hast though forsaken me? Part II

Posted April 8th, 2007 in Technology, University of Iowa and tagged , , , , , by Dennis

Integrating mySQL with Java Servlets is tedious, but at least the GUI is easier to derive. Looks like it works OK, but there are still some java stuff I keep forgetting:

  1. Converting String to an Int -> Integer.parseInt(str); OR new Integer(str).intValue(); OR Integer.valueOf(str).intValue();
  2. String to byte[] -> str.getBytes();
  3. byte[] to String -> str.getBytes();
  4. int to String -> Integer.toStrin(n); OR “” + n;
  5. Integer to int -> num.intValue();
  6. String to char[] -> str.toCharArray();
  7. char[] to String -> new String(ca,0,ca.length);

Ugh. Now, I’m calling it a day.

Leave a Reply