Java Servlets: Why hast though forsaken me? Part II
Sunday, April 8, 2007
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:
- Converting String to an Int -> Integer.parseInt(str); OR new Integer(str).intValue(); OR Integer.valueOf(str).intValue();
- String to byte[] -> str.getBytes();
- byte[] to String -> str.getBytes();
- int to String -> Integer.toStrin(n); OR “” + n;
- Integer to int -> num.intValue();
- String to char[] -> str.toCharArray();
- char[] to String -> new String(ca,0,ca.length);
Ugh. Now, I’m calling it a day.
Tags: Engineering, Java, MySQL, Programming, servlet, University of Iowa
Category: Technology, University of Iowa
