| Recent Answers |
 |
 |
2008-09-05 jdbc: Hi, You need to do something like this: try { stmt = conn.prepareStatement("INSERT INTO table(DateField) VALUES(?)"); try { stmt.setTimestamp(1, new Timestamp(new Date().getTime()))...
|
2008-09-04 creating an object from Class variable: Hi, Remember that you need to use the fully qualified name of the desired class in forName() e.g. forName(java.lang.Thread) You don't need to initialize the class Person this way. You could just...
|
2008-09-04 creating an object from Class variable: You can use (if you are linking with the person class): Person person = (Person) personclass.newInstance(); But, why use reflection unless you have to. Why not just use the constructor: Person...
|
2008-08-28 java: Hi, To make a JAR file executable, you need to specify the main class of the application in the MANIFEST.MF file. e.g. Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.5 Created-By: 1.6.0_01-b06...
|
2008-08-26 Double value Handling in java: Hi, You need to use the NumberFormat and DecimalFormat classes to format the number the way you want. e.g import java.text.DecimalFormat; import java.text.NumberFormat; public class DecimalFormatExample...
|
| More Answers for "Java" |