2,443 Posted Topics

Member Avatar for Cassandra Low

[code]f.getParentFile().mkdirs();[/code] The api docs work wonders, if you actually look at them.

Member Avatar for mKorbel
0
153
Member Avatar for fonzi
Member Avatar for fonzi
0
127
Member Avatar for fonzi

Well, why are overwriting the value each iteration (rather than using +=), why are you formatting the same data every time (rather than using getTime, in that spot, directly), and why haven't you written a main method, yet (we are not going to do it for you)?

Member Avatar for fonzi
0
225
Member Avatar for bharathisankhya
Member Avatar for jansenkzh

Well, of course it does, when you are not making any effort to sort the information. First you need to equate the data in the two arrays with each other (probably hashmap) then look at java.util.Arrays to sort the score and output the info from the hashmap.

Member Avatar for masijade
0
131
Member Avatar for ganesh641
Re: java

Find (or invent) a definition for "Purely object oriented language" (there is no official, (e.g. IEEE) definition for it BTW), then think about whether anything about the language doesn't fit that.

Member Avatar for Sadun89
1
120
Member Avatar for TheWhite

SimpleDateFormat with the TimeZone set to GMT, to parse the date, then simply display the date (without using the DateFormat object, or using a different one where you have not specifically set a TimeZone).

Member Avatar for JamesCherrill
0
5K
Member Avatar for patel.ajay82

Nevermind that. See the link anyway. See [url=http://java.sun.com/developer/onlineTraining/JavaMail/contents.html]this[/url].

Member Avatar for kvprajapati
0
3K
Member Avatar for 8.brahim
Member Avatar for Joslup
Member Avatar for mKorbel
-1
93
Member Avatar for java_programmer

Where are the package statements in those servlets? And where, under WEB_INF/classes are they located, exactly.

Member Avatar for java_programmer
0
307
Member Avatar for bhallarahul
Member Avatar for echocoder
Member Avatar for 9w43

Are you maybe ignoring compiler messages? Because your "SecondThread" class has all sorts of "Unhandled Exception IOException" errors, so it never gets compiled, so the method [i]is[/i] "undefined" when trying to compile the other class since "SecondThread" is never fully defined, since it hasn't, and can't, compile.

Member Avatar for masijade
0
178
Member Avatar for omaiaa0p

Uhm, show us your code, maybe? Or at least give a much more detailed description than "implemented in a resultset".

Member Avatar for masijade
0
92
Member Avatar for harinath_2007
Member Avatar for masijade
0
160
Member Avatar for koduruabhinav
Member Avatar for loidz123

JOptionPane for a "GUI" (Scanner for a "console") program. See the API docs for those classes and google for some tutorials.

Member Avatar for loidz123
0
79
Member Avatar for jdm
Member Avatar for jdm
0
179
Member Avatar for Sybre

You can [i]try[/i] getting it from the UserAgent (google that), but many times that is not provided (due to varying user security settings). You can [i]try[/i] planting some JavaScript onto one page and posting that info to the next link, but security settings may prevent this, as well. IOW, that …

Member Avatar for masijade
0
87
Member Avatar for bufospro
Member Avatar for rjdelight

I thought you said you'd post what you had. Unfortunately for you all I see is the assignment text. Where is your code? You should, at least, be able to create class shells with empty methods and vars for the described attributes, right? Start with that, then start filling those …

Member Avatar for masijade
0
175
Member Avatar for roshanchugh

A "JSP" does not run "standalone". Install a tomcat (or some other web container) on that "other machine" and deploy the web application to that web container then use a standard http request (i.e. browser view) to "execute" it.

Member Avatar for peter_budo
0
112
Member Avatar for sneha mehta

Sorry, if you don't, yet know how to handle exceptions you should not be attempting JDBC, yet. See [url=http://download.oracle.com/javase/tutorial/essential/exceptions/index.html]this[/url].

Member Avatar for masijade
0
148
Member Avatar for m610

Are you trying to learn JavaScript, or Java, because judging by [QUOTE=m610] I'd like to put this code in a template that all like page will use.[/QUOTE] it looks like you really want JavaScript as Java has nothing to do with "pages". And please respond as if it is JavaScript …

Member Avatar for masijade
0
380
Member Avatar for jonhunter89

[QUOTE=jonhunter89;1501371]i dont know wat codes to be use! cause our professor just gave us that output and didnt teach us how to program that LIBRARY SYSTEM.. =( now where having some trouble in doing this project because all of my classmates are still newbie in programming...[/QUOTE] Of course he did. …

Member Avatar for Taywin
0
141
Member Avatar for minimi

Have you, as yet, done what the second line of that Note says? BTW, you [i]did[/i] notice that is a [i]Note[/i] and not an error, right?

Member Avatar for masijade
0
187
Member Avatar for khattak24
Member Avatar for coervivekmca

Is this a jsp or a servlet, as you are using jsp scriptlet tags, but seemingly inside another scriplet block, or inside a servlet. Neither of which, of course, works. If a servlet, use PreparedStatement and its setWhatever method with that getParameter call (transforming it to the proper type, of …

Member Avatar for masijade
-1
64
Member Avatar for prem2

If you are using preparedstatement [i]properly[/i] you are [i]already[/i] preventing sql injection.

Member Avatar for Taywin
0
1K
Member Avatar for deepakkrish

[code]set i=84 while [ $i <= 92 ] do # whatever i=$(($i + 1)) done[/code] or stick with the first version. What you don't seem to understand is that ".." is an [i]operator[/i] (just like "+" is an operator) [i]defined[/i] in Perl. It is, as you can see above, not …

Member Avatar for masijade
0
114
Member Avatar for gold2011

Uhm something like [code] //pseudo code if (prod) { // display prod items } // display non-prod items [/code] IOW [i]always[/i] display the "non-prod" items and only display the "prod" items if that option is selected.

Member Avatar for masijade
0
203
Member Avatar for boshu

[code]rm `ls | egrep -v "(20110225104849|20110225104833|20110225104848)"`[/code]

Member Avatar for boshu
0
173
Member Avatar for nard23

The "top left to bottom right" is row == col The "top right" to bottom left" is (row + col + 1) == 4

Member Avatar for nard23
0
83
Member Avatar for oldezwe

I should think their [url=http://javadesktop.org/articles/jdic/index.html]homepage[/url] could help you.

Member Avatar for masijade
0
234
Member Avatar for shruti_lively24

jsp is a servlet that runs on the server and produces output (usually an html page). JavaScript (and it [i]is[/i] one word, and has nothing to do with java) runs on the client in the browser after the server has delivered it. There is no reason that what the jsp …

Member Avatar for masijade
0
61
Member Avatar for 54uydf

[QUOTE=jon.kiparsky]2) If you're mapping custom objects, you'll want to look into hashcodes. There's a lot of talk out there about good hash codes, so there's a lot of reading to do. Have fun.[/QUOTE] Not to forget the equals method, of course. ;-)

Member Avatar for 54uydf
0
115
Member Avatar for devin2203

Well, lets see what you've tried. But really, all you need to do loop from the end of list forwards until you reach the provided index.

Member Avatar for devin2203
0
461
Member Avatar for iwannalearn

instance and/or class variables and they are used for what all variables are used for, storing values.

Member Avatar for JamesCherrill
0
87
Member Avatar for end3r
Member Avatar for end3r
0
439
Member Avatar for Phil++

[QUOTE=ztini]Although this gives a char array; the OP is looking for an array of Strings.[/QUOTE] Not necessarily. He said "array" not String array. And just because what he posted was a String array neither means that he [i]wants[/i] or [i]needs[/i] a String array. The OP may simply not no how …

Member Avatar for mKorbel
0
158
Member Avatar for Progr4mmer

[QUOTE=Progr4mmer;1490958]how can i get java to enter/type text into a textbox for me once i select it(click inside it) so the cursor is there. Also how would i get it to send the enter key or other "non-text" keys.[/QUOTE] If you want your program to automatically insert text into its …

Member Avatar for mKorbel
0
177
Member Avatar for Amillia89

That statement reads as follows [code] = %'A'[/code] you wanted [code] = 'A%'[/code] correct?

Member Avatar for Amillia89
0
201
Member Avatar for lkrvk
Member Avatar for GooeyG

This sort of thing [code]String sqlUpdate = "UPDATE Staff (id,lastName,firstName, mi, address," + " city,state,telephone, email) SET ( '" + jtfID.getText().trim() + "','" + jtfLastName.getText().trim() + "','" + jtfFirstName.getText().trim() + "', '" + jtfID.getText().trim() + "', '" + jtfAddress.getText().trim() + "', '" + jtfCity.getText().trim() + "', '" + jtfTelephone.getText().trim() + …

Member Avatar for masijade
0
272
Member Avatar for jogendar

Not with pure Java, no. The ad-hoc network will already have to exist and then you can use it to connect from one to the other, yes.

Member Avatar for jogendar
0
74
Member Avatar for sneha mehta
Member Avatar for bradyramone

Is that [i]your[/i] message or is that a [i]real[/i] exception message? Also, do not cobble together statements like this. Use a PreparedStatement and its set... methods to include the username and password or you are just asking for problems. I can't say anything about that "into @name" syntax since I …

Member Avatar for masijade
0
2K
Member Avatar for Naresh Bammidi

I didn't know java had swings. It is kind of hard for an abstract computer language to have playground equipment. It is called Swing and saying "swings" makes you sound like an idiot (not saying you are but saying that makes you sound like it). Now, please explain what you …

Member Avatar for masijade
0
138
Member Avatar for oldezwe

Google for an HTMLParser, then use that to parse the page, and then retrieve the links from that.

Member Avatar for oldezwe
0
73

The End.