27.04.2013 Views

330 Java Tips.pdf - FTP Server

330 Java Tips.pdf - FTP Server

330 Java Tips.pdf - FTP Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

String, text, numbers, I/O II part<br />

But the calculation of the difference in times may not be suitable due<br />

to timezone issues and such. I believe there must be a better way?<br />

Michael B. Allen<br />

Q: How do I convert a String to an integer. For example: String strSEQ =<br />

"SEQ7";<br />

How do I pull "7" from the string and convert it to an integer?<br />

Answer: I'd do something like this:<br />

StringBuffer digits = new StringBuffer();<br />

char c;<br />

for (int i=0; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!