2,443 Posted Topics

Member Avatar for jips11in
Member Avatar for boifang

What does the method signature [code]public int getorder()[/code] mean? And does the method actually fulfill that contract?

Member Avatar for masijade
0
73
Member Avatar for McCurry0x77

What is the ".dat" file? That extension doesn't really [i]mean[/i] anything and many programs store many different types of things using that extension in many different formats. If know what is saved, and, more importantly, [i]how[/i] it is saved, we could give you a better answer. P.S. A BufferedReader will …

Member Avatar for masijade
0
125
Member Avatar for curbster

Call split("\\s+") on the string that results from calling toUpperCase(). Then, on each element of that resulting array, call charAt(0) on the result of calling trim() on that element.

Member Avatar for ztini
0
3K
Member Avatar for Lourdupinto

Neither. The only language that [i]could[/i] be called "purely" OO (although there is no "official" definition of the term) is SmallTalk.

Member Avatar for Lourdupinto
-3
151
Member Avatar for anumash
Re: NaN

FYI, this thread has already been marked solved, so I can only assume he had already figured out the answer (or had cross-posted on other forums so that we would waste our time answering), but the OP should have the decency to post the answer (not necessarily the "new" code …

Member Avatar for anumash
0
121
Member Avatar for mangopearapples

P.S. It [i]might[/i], in the future, help to [i]describe[/i] "don't work" precisely, as that is the singularly most useless problem description in the world.

Member Avatar for mangopearapples
0
280
Member Avatar for careless_monkey

Well, rather than simply googling for finished code, you should be reading tutorials and the [URL=http://download.oracle.com/javase/6/docs/api/]API docs[/url]. See the API docs for URLConnection for info on how to get the headers, and there is a link in there to follow that will give you information about headers in general. Do …

Member Avatar for masijade
0
194
Member Avatar for SVW

No. You can use the "length" together with a for loop and combination of two calls to substring with each iteration.

Member Avatar for SVW
0
133
Member Avatar for newbie14
Member Avatar for freaky_sxyvs

For the create statement you need only know how deep the second dimension is (i.e. the array[0].length) then use a loop to use String concatenation (or better two StringBuilders, but I don't know if you're ready for those) to create the sql for a CREATE TABLE statement and an INSERT …

Member Avatar for masijade
0
510
Member Avatar for Shanti C

You need to restart the application after loading new classfiles. This happens automatically when you deploy a war file.

Member Avatar for Shanti C
0
190
Member Avatar for stephy1

Is this the same reason for all the Java stuff? And, if you are preparing for an "interview", don't you find it a bit late to be learning that for which you have applied? Common sense says you should have some idea about what it is you're applying for [i]before[/i] …

Member Avatar for deepakkrish
0
92
Member Avatar for queenking

Well, StringTokenizer won't help. Create an array of ((string.length() / 60) + 1) then use substring and a counter (starting at 0) to populate the elements. See the API docs for String, give it a try, and post that code. Edit: Nevermind, the problem is something completely different. String tokenizer …

Member Avatar for masijade
0
226
Member Avatar for Hanoon09
Member Avatar for rahul_hh

Because, according to your logic, you are only displaying an error when the username matches but the password does not. Why do you not simply query with the username and password and let the DB do the work? Also, you should not be storing plaintext passwords anywhere. Use MD5 and …

Member Avatar for rahul_hh
-1
143
Member Avatar for medaugh

I coould be completely wrong, because I always put it against the left edge anyway, but I believe the "END_SCRIPT" marker you are using to end the so-called here document, needs to be against the left hand side, in otherwords at the beginning of the new line.

Member Avatar for JeoSaurus
0
627
Member Avatar for earwax
Member Avatar for earwax
0
240
Member Avatar for stephy1

Then you may have [i]declared[/i] the variable outside the loop, but you didn't [i]initialise[/i] (i.e. define) it. IOW if you do [code]String bogus; while (true) { if (bogus.equals("Whatever")) { break; } }[/code] (as a contrived example) you will get that compiler message, whereas with [code]String bogus = ""; // or …

Member Avatar for VernonDozier
0
176
Member Avatar for vishal18

dispose() after hiding. setVisisble(false) simply "hides" it, it does not "get rid of it".

Member Avatar for vishal18
0
97
Member Avatar for stephy1

[QUOTE=stephy1]I guess i have to give a command line argument.[/QUOTE] As already siad [url=http://www.daniweb.com/forums/thread344107.html]here[/url].

Member Avatar for masijade
0
724
Member Avatar for Zabzacon
Member Avatar for dangari

Probably just simply two different instances of the program running at the same time. A so-called race-condition. Both checked table b and did not find a record and so both added it.

Member Avatar for dangari
0
137
Member Avatar for chipsch

Uhm, an array cannot create objects. After you "get the data from the user" use an if statement to check if the element of the array to which you want to assign the data is null, and if so, create an instance of the "object" assign it to that element. …

Member Avatar for chipsch
0
179
Member Avatar for xshinichix

By writing a class with a main method and another method, and three other classes that extend that class and override that "other" method. In the main you create four references to the original class by creating an instance of each of the four classes you've created than call the …

Member Avatar for masijade
0
1K
Member Avatar for stephy1

Try the [url=http://download.oracle.com/javase/tutorial/java/nutsandbolts/op3.html]tutorials[/url].

Member Avatar for masijade
0
54
Member Avatar for stephy1

[QUOTE=hanvyj]As for this: "If anybody knows anyother simple way to design a thread tell me." Are you asking about threads now? If you dont know how to do 2D arrays, leave threads for annother day.[/QUOTE] Well, investigate the posting history.

Member Avatar for stephy1
0
109
Member Avatar for stephy1

Because i is defined within the loop and the condition of the lopp is, technically, outside the loop. A variable only "exists" within the scope in which it is created, in this case only [i]inside[/i] the loop and [i]not[/i] outside. Edit: Do note, however, that a variable created [i]outside[/i] the …

Member Avatar for masijade
0
110
Member Avatar for Dean_Grobler

It is the "path" on which "class"es will be searched for by the jvm/compiler. Edit: And [i]don't[/i] do this on the system environment CLASSPATH variable. I know I have told you this already, if running from a web container/app server place jars in the META-INF/lib directory (usually), if running/compiling from …

Member Avatar for peter_budo
0
659
Member Avatar for ajayb
Member Avatar for ajayb
0
126
Member Avatar for ankurmawanda

This is not the code you're running considering the message [code]syntax error at or near "["[/code] Edit: Not that you should be using scriptlets [i]at all[/i]. And also most definately [i]not[/i] be loading the driver and getting a new connection with every page load, use a pool.

Member Avatar for masijade
0
296
Member Avatar for Kate Teoh

You can see how many by inspecting the int return of the executeUpdate which tells you how many were affected. If you want to tell [i]which[/i] ones, you are going to have to make a copy and compare, realising that other changes may have taken place between these actions.

Member Avatar for Kate Teoh
0
126
Member Avatar for stephy1

as long as it is taking place in the main method it is creating a reference to a file using a name provided on the command line (the first argument after the classname in the java command).

Member Avatar for stephy1
0
374
Member Avatar for stephy1

You can't. As I have told you [url=http://www.daniweb.com/forums/thread343781.html]here[/url], simply assign some instance variable in the constructor and have the run method do different things based on the value of that/those variables. The only other way is to write three different classes.

Member Avatar for stephy1
0
90
Member Avatar for stephy1

Uhm, this [inlinecode]MyStackThreads[j][/inlinecode] is [i]not[/i] a constructor. A constructor looks like [code]public ClassName(ParamType param) { // do something to "initialise" the class }[/code]

Member Avatar for stephy1
0
385
Member Avatar for jecris

See [url=http://www.daniweb.com/forums/thread344046.html]this response[/url]. Now it is no longer a warning.

Member Avatar for masijade
0
94
Member Avatar for jecris

See [url=http://www.daniweb.com/forums/thread344046.html]this response[/url].

Member Avatar for masijade
0
126
Member Avatar for jecris

See [url=http://www.daniweb.com/forums/thread344046.html]this response[/url]. And you are now getting an infraction warning.

Member Avatar for masijade
0
113
Member Avatar for jecris

See [url=http://www.daniweb.com/forums/thread344046.html]this response[/url].

Member Avatar for masijade
0
142
Member Avatar for jecris

Sure. Will we give it to you, no. We are here to [i]help[/i] [b]you[/b] correct [i]your[/i] code, we are not here to do your (home)work for you. If that is all you are looking for go [url=http://www.rent-a-coder.com/]here[/url].

Member Avatar for masijade
0
472
Member Avatar for lisaroy1

Using different text (and different formating) depending on the language and/or region.

Member Avatar for masijade
0
83
Member Avatar for spitfire5295

Show your new code, it looks like you are multiplying the last number by ten (or maybe just adding a zero to the end through some other manner). P.S. I would also suggest not using "2.0" in your modulo statement, just use 2, otherwise you are making that a double …

Member Avatar for spitfire5295
0
120
Member Avatar for uma.kotha89

Try increasing your permgen space. (Google that and see your server documentation as to where to make the change.)

Member Avatar for masijade
0
130
Member Avatar for nayak.vikash
Member Avatar for deb081900
Member Avatar for masijade
0
94
Member Avatar for madtowneast

That * catches [i]both[/i] files on the same command, so it assumes you are trying to move [i]both[/i] files to a directory. You will have to handle them one at a time (i.e. [i]without[/i] the * ).

Member Avatar for masijade
0
150
Member Avatar for MrDiaz

No there isn't, because it doesn't [i]have[/i] a name. The only thing you can do, is store the table in a Map and use the key that it is stored under as the "name". A variable is simply a way for the programmer to keep track of the reference. In …

Member Avatar for masijade
0
10K
Member Avatar for newcoder310

Write it to another file, delete the old and rename the new to the old. In this "special" circumstance you actually [i]could[/i] overwrite the five characters [pre]"#how"[/pre] with [pre]"how "[/pre] (note the extra space) using RandomAccessFile, but that is [i]not[/i], of course, the same as "deleting" the "#". File are …

Member Avatar for masijade
0
108
Member Avatar for ahmed_fawzy
Member Avatar for george61
Member Avatar for masijade
0
232

The End.