Search:
Type: Posts; User: Bnt
Search:
Search took 0.20 seconds.
-
January 22nd, 2007, 01:45 AM
Hi,
Firstly, please could you start a new thread for a new question.
Secondly, please post more code, it's hard to see what code is unreachable whith only those 2 lines of code.
-
November 21st, 2006, 03:15 AM
Hi
For comparing Strings you need to use the equals() method ie:
String a = "123";
String b = "123";
if(a.equals(b)){
-
November 7th, 2006, 12:52 AM
Hi,
To get the session:
// Will return the currreent session, if 1 doesn't exists will return null
request.getSession(false);
// OR
// Will return the currreent session, if 1 doesn't...
-
November 2nd, 2006, 03:22 AM
Hi,
If you are using JDK 5 or above there is an easier way of doing. The way that smbelow suggested works fine except that you will need to cast the object you get out of the Vector to a Double...
-
November 2nd, 2006, 02:55 AM
Thats because you are comparing the title of the dvd to itself:
if(dvd.title.equalsIgnoreCase(dvd.title))
which will always return true since you are comparing the title of the same dvd. Then...
-
November 1st, 2006, 12:19 PM
It is possible then that your Connection object is null, do you get any errors when creating the connection? On the line 63 where you call connection.createStatement, that is where the NullPointer...
-
November 1st, 2006, 11:48 AM
Well firstly you need to decide how you are going to save it to a file, are you going to serialize the objects directly to the file or are you going to take the approach of writing the text out to a...
-
November 1st, 2006, 11:37 AM
Hi,
How are you dividing the panel into a grid exactly?
-
November 1st, 2006, 11:32 AM
Hi,
Firstly without all your code it is hard to help, I don't know what type the variable dvds is? You say it is an array but it looks more like a List of some type. If you want to just get the...
-
November 1st, 2006, 11:22 AM
Hi,
When using request.getParamtere() you should always check for null, ie:
String sqlStatement = request.getParameter("sqlStatement");
if(sqlStatement == null){
// Handle this
}
-
October 27th, 2006, 02:20 AM
Hi,
You can get a free download of the Java tutorial from sun, get it HERE . Surfing the internet will also provide you with lots of information, have a look at sites like codeguru, jguru,...
-
October 25th, 2006, 12:38 PM
Hi,
<Car> is a generic, and by using it you are telling the VM that all objects inside the List will be of type Car, so when you retrieve an object from the List you won't have to cast it to a Car...
-
October 25th, 2006, 11:08 AM
Click on the link in my signature to see how to use them. They format your code so we can read it, otherwise your code is impossible to read.
-
October 25th, 2006, 10:33 AM
-
October 25th, 2006, 10:31 AM
And please use code tags when posting code, it makes it a whole lot easier to read. I actually never went over your code because it hurts my eyes at the moment. So if you want more help with your...
-
October 25th, 2006, 10:28 AM
When a code block is labeled as synchronised then only one thread can execute the containing code at a time, so there is a lock on the synchronised block. If other threads are also trying to execute...
-
October 25th, 2006, 10:19 AM
Hi,
Try using ArrayList instead of Vector if you DON'T need synchronization. Vectors are synchronised and ArrayLists aren't, this means that if you don't need the List to be synchronised you are...
-
October 24th, 2006, 05:52 AM
Using == on a String compares if the 2 objects you are comparing are the same object, it doesn't compare the actual contents of the String.
-
October 24th, 2006, 02:07 AM
Hi,
You can't compare a String with == or with != you need to use the equals method. eg:
(! name.equals("q"))
Hope This Helps
-
October 20th, 2006, 10:10 AM
I was just thinking about your problem and came to this conclusion. I'm not sure how your applet works or what it does, but there is obviously some code there, that you don't wan't ppl to have access...
-
October 20th, 2006, 09:00 AM
That is exactly how I would do it.
You can't really avoid it, you can try obfuscate your code, which will make it more difficult to interpret, search google for "obfuscate", it should give you...
-
October 20th, 2006, 07:57 AM
Hi Theodore,
Well, the .class files will have to be downloaded over the net, in order for the clients pc to run the applet. So they might have access to the .class files. And any .class file can...
-
October 19th, 2006, 10:11 AM
Hi
Depending on what version of JDK you are using there are 2 different methods of doing this. Prior to JDK 5 version, have a look at the Runtime class, from JDK 5 and up have a look at the...
-
October 16th, 2006, 11:47 AM
Hi,
JSP doesn't have a date picker. What you need is a javascript date picker and you can find many of them on the web just by searching google, have a look HERE
Hope This Helps
-
October 3rd, 2006, 04:34 AM
You could also convert the number to a String, strip of the minus sign, convert all the characters back to integers and then add them.
public int addDigits(int num){
String s =...
|
Click Here to Expand Forum to Full Width
|