2,443 Posted Topics
Re: Yeah, actually learn the language (there are plenty of tutorials and API docs) rather than simply copying random blocks of code. Why don't you tell us what you think that code is doing (line for line), see the [url=http://download.oracle.com/javase/6/docs/api/]API docs[/url] for help. At least that way you will have to … | |
Re: Essentially crossposts [url=http://www.java-forums.org/new-java/34383-question-about-adding-using-arraylist-using-terminal.html]Number 1[/url] [url=http://www.daniweb.com/forums/post1375354.html#post1375354]Number 2[/url] [url=http://www.daniweb.com/forums/thread322926.html]Number 3[/url] [url=http://www.daniweb.com/forums/thread322572.html]Number 4[/url] | |
Re: [QUOTE=B.A.A]Hii all please i want the answer for this Question for JAVA program:") [B] ** How to write a java program to read the value of salary (double). if the salary is above 5000,calculate the bonus as 20% of salary.otherwise, calculate the bonus as 10% of salary ???[/B] > > … | |
Re: See the API docs for DecimalFormat. Per default it will only print as many decimal places as need to display the value, which it is doing there. | |
Re: See the File class for a method to get the names of the files in a directory as an array, then use the removeAllItems of the ComboBox and the addItem method of JComboBox in a loop, then validate/repaint the JComboBox. | |
Re: LookAndFeel Google that term. | |
Re: long Edit: As if the API docs for Thread couldn't have told you that, or what that number represents. | |
Re: pseudo code [code]for i ... do cd ${name}${i} diff ... cd .. done[/code] | |
Re: Classpath, classpath, classpath. Include the jars that contain those packages on your classpath with the -cp option when using javac or added as a library in your project. | |
Re: [QUOTE=saisakthi]I need to use this in scriplet.[/QUOTE] No you don't, you shouldn't be using scriptlets [i]in the first place[/i]. | |
Re: Lets see yours, and we'll help you fix it, otherwise see [url=http://download.oracle.com/javase/tutorial/essential/concurrency/index.html]this[/url]. | |
Re: Because that check in the while loop takes much less than a single millisecond to execute, so, "subtracting a millisecond" is every iteration is, of course, faster than "realtime". Simply keep checking the currentTime against the "startTime", and set the "startTime" to the currentTime as soon as it is at … | |
Re: No idea what you're [i]really[/i] talking about, but this seems more of a JavaScript/HTML question (i.e. how to write it properly) than a JSP question (since the actual action seems to work, according to your statement, but that you cannot get the HTML/JavaScript the way you want it). | |
![]() | Re: If you are [i]actually[/i] talking about JSP, then [i]that[/i] is an HTML question, as the HTML produced by the JSP is what will control that. |
Re: Well, it [i]might[/i] help to know what error you're getting, and [i]what[/i] exactly you are trying and what you are trying it with. | |
Re: Creating a new table is completely contradictory to the purpose of a relational db. As far as doing it, if you insist and we all know you will, and will come up with all sorts of reasons as to why it [i]has[/i] to be that way, you use a Statement … | |
Re: We are not a free pool of slaves. We will help you correct what you have but we will not do it for you. | |
Re: Why should we do your work, and/or your research, for you? This is [i]your[/i] project so [i]do[/i] it. Gods I am [i]really[/i] getting sick and tired of the feel of entitlement kids have these days (I know, we all [i]had[/i] it, but it just seems [i]so[/i] much worse than it … | |
Re: [url=http://download.oracle.com/javase/tutorial/essential/io/charstreams.html]BufferedReader, while, readLine[/url], split, new Contact | |
Re: [QUOTE=ADIKTED]how can i create a application that will compute fot the net income of a particular employee[/QUOTE] By typing in a text editor. We are [i]not[/i] a homework service. | |
Re: By reading the [url=http://download.oracle.com/javase/tutorial/jdbc/index.html]tutorials[/url]. | |
Re: Looking at your string I assume that the different parts of the string are seperate4d by a TAB character. If so do the following: [code] String line = "BATHROOM TOI 48157 Y DOVE BWASH MCDAMIA 375ML 6 NEW" ; String[] parts = line.split("\\t"); //parts[0] = "BATHROOM TOI"; //parts[1] = "48157"; … | |
Re: If the method in which the exception may occur is capable of handling that exception, then you catch it, otherwise you throw it. | |
Re: What "border lines". And, if you have a "scrollbar", then you should probably be attempting to change the border on the JScrollPane. And try setting the border to an "EmptyBorder" and not null. | |
Re: If "year" is the value to check then that, of course, is the value you need to use in the if statement. In any case, the second version is the one to use, as long as you are checking the right value and actually check for 2012, not 2010. | |
Re: mypackage/HelloWorld.java performed from /home/user/workspace | |
Re: [code]String[] strings = { "a", "b" };[/code] Then see the API docs for Scanner (as this seems to be the preferred method for most instructors, although it is [i]not[/i] my personal choice) and Integer.parseInt(String) (although with Scanner this part is not necessary). [code]System.out.println(strings[index]);[/code] | |
Re: Sure. Show us what you have we'll guide you in writing the rest. | |
Re: Read the MySQL manual. The user administration portion. Pay close attention to the portion about Grants. | |
Re: Well, what is your idea of a "fair amount of code"? Why don't you show us what it is you've tried? | |
Re: Why should I help either pirate someone elses stuff (although with an applet, if you know [i]anything[/i] about them, you can get the compiled code easily enough) or help you cheat on some assignment? | |
Re: Of course we can, but the question is, can you? It is your job and/or homework, so do it. If you have problems, then post your code and your complete error message, and we will help [i]you[/i] solve it. If you are looking to contract someone to do something, there … | |
Re: This seems to be a real ongoing thing and I doubt it will ever be resolved without hands-on help. [url]http://www.daniweb.com/forums/thread314127.html[/url] [url]http://www.daniweb.com/forums/thread316336.html[/url] [url]http://www.daniweb.com/forums/thread315633.html[/url] [url]http://www.daniweb.com/forums/thread306626.html[/url] [url]http://www.daniweb.com/forums/thread304095.html[/url] | |
Re: Wow, a [i]whole [b]5[/b] years[/i] in [i]all[/i] of that? Didn't leave a whole lot of time to specialise in anything, did it? You really think you're qualified to train people? Tutor, yeah. Hold classes (judging only from this post, of course), I think not. | |
Re: [QUOTE=achilles92;1363224][B]how do I start making database in using access database using java? please help me.... Thank you..[/B].[/QUOTE] Closing this 5 year dead zombie. See the [url=http://download.oracle.com/javase/tutorial/jdbc/index.html]tutorials[/url] | |
Re: Okay? And your question is? (Assuming "in" is a static import of System.in) | |
Re: The same response I gave in the JSP forum for this question. Move all of this scriptlet stuff out of the JSP into one, or more, beans. | |
Re: Either change the "Choice1" method to void and remove lines 23 and 33 (above), or change "Choice1" so that it does not take any argument, change line 23 (above) to include the Type declaration, and "combine" lines 10 and 12 (above). All the line numbers in this post refer to … | |
Re: Put that code into a different method (not main) that accepts an integer as a paramter (and change i<2*i+1 to i<2*parameter+1) and then call that method from main with 10000, 20000, etc (which can be figured in a for loop from 1 to 10 multiplying this number by 10000). | |
Re: element + element ? It might help to have a better explanation of the problem along with the code you've already tried and the error/compile messages (complete messages/stacktraces) that it produces. | |
Re: More buzzwords with less meaning in a shorter phrase I have never seen. | |
Re: Change those classes to use JPanels rather than JFrames. Edit: Better (although you probably wouldn't comprehend it, yet) is to extend JComponent and override any method that you dont wan't to be able to have effect your component. |
The End.