1,678 Posted Topics

Member Avatar for PhiberOptik

character[0] wasn't initialized . . that's all I can tell you from the information given.

Member Avatar for ~s.o.s~
0
101
Member Avatar for Bobon

@ OP: You're using the Date class constructor incorrectly. It says to put the arguments in as year, month, day. Furthermore if you read the Javadoc for the Date class's [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html#Date%28int,%20int,%20int%29"]constructor you are using[/URL] you will see that even if you reorder your parameters, it still won't work as expected. …

Member Avatar for kvass
0
101
Member Avatar for David22

David, I think this example might help. Note that you should still check out the link Ezzaral selected; I only implemented one of three methods that it suggested to implement. [CODE]public class Person { String ssn = ""; String firstName = ""; String lastName = ""; public Person(String ssn, String …

Member Avatar for BestJewSinceJC
0
119
Member Avatar for Alex_
Member Avatar for danz23
Member Avatar for liaa

There is a general set of rules for the site and numerous announcements telling you how to post in this forum. Any one of those things would have clarified that we don't write people's homework. I'll even link you to them. http://www.daniweb.com/forums/announcement9-2.html http://www.daniweb.com/forums/faq.php?faq=daniweb_policies

Member Avatar for javaAddict
-1
188
Member Avatar for houlahan

[url]http://www.jdom.org/[/url] [url]http://www.javaworld.com/javaworld/jw-05-2000/jw-0518-jdom.html[/url]

Member Avatar for ~s.o.s~
0
77
Member Avatar for PhiberOptik
Member Avatar for Ezzaral
0
123
Member Avatar for jtodd

Jtodd, stultuske has already provided you with the correct information. . if you take a look at the [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html"]Javadoc for Random[/URL], you'll see that there is a method defined as "public int nextInt(int n)" that will be helpful in doing what he suggested. Again, the trick is to have that …

Member Avatar for jtodd
0
128
Member Avatar for whoamineo89

I've never seen anybody do something like "return main()" before. Use a while loop instead if you are trying to get the effect of looping.

Member Avatar for donelliewhyte
0
191
Member Avatar for Megalodeez
Member Avatar for coachHinesfan

The ads don't bother me except for the large one at the top that constantly pops itself up when I'm trying to click on the forum name.

Member Avatar for Biker920
0
265
Member Avatar for xxunknown321

Add one to the other using a for loop or a for-each loop. Use Collections.sort(linkedList) to sort it.

Member Avatar for BestJewSinceJC
0
155
Member Avatar for need

[CODE]Collections.sort(yourArrayList);[/CODE] [url]http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#sort%28java.util.List%29[/url] And mark your other thread solved, since you're apparently finished with it.

Member Avatar for AbhikGhosh
0
156
Member Avatar for XodoX

If your teacher requires that you make your own get, remove, etc, then there is a good chance your teacher also requires that you use your own array - not ArrayList. That being said, if you really want to have your own get method, you could do [CODE] public Car …

Member Avatar for BestJewSinceJC
0
114
Member Avatar for romariejhoanna

Should we assume that you followed the rules, asked a specific question, and showed effort towards solving the problem? Or would you like the working code, freshly baked, straight from [Salem, Ancient Dragon, WaltP, Narue]'s oven? In the latter case you're more likely to get my stale humor instead. :icon_rolleyes:

Member Avatar for romariejhoanna
0
242
Member Avatar for Dizzzy

Do you mean a [I]JFormattedTextField[/I]? And you'd do something like [CODE]Integer.parseInt(textField.getValue());[/CODE] Keep in mind that you should use a try catch in case of input error. Double has a similar method if you want to parse a double.

Member Avatar for gangsta1903
0
118
Member Avatar for need

[URL="http://www.javapractices.com/topic/TopicAction.do?Id=17"]Read this article[/URL]. If you have any questions after reading it, post them.

Member Avatar for Ezzaral
0
174
Member Avatar for emanicom
Member Avatar for emanicom

Code snippets are for working code examples, not for getting help. Normal threads with your code [I]in code tags[/I] are for help.

Member Avatar for emanicom
0
185
Member Avatar for msr

private - only access it in methods of the same class. If you don't like this but want to keep it private, either use get and set methods or you're out of luck.

Member Avatar for BestJewSinceJC
0
76
Member Avatar for shawnfrancis
Member Avatar for Aisha25

1. Explain exactly what you are stuck on. 2. Explain why you are stuck. This information might include what inputs make your program fail, what section of your program is failing (with line numbers), etc.

Member Avatar for BestJewSinceJC
0
991
Member Avatar for dema_sami

You could start by getting a book from the library and reading about master theorem or by looking it up online. It isn't impossible.

Member Avatar for mrnutty
-2
80
Member Avatar for handrews3583

[QUOTE=handrews3583;1145584] If I put just one system.exit() at the end of the program, will this terminate each one as it is completed? [/QUOTE] You don't need to put System.exit() in your program at all. Just take it out completely. Your program runs in a top to bottom (sequential) fashion, so …

Member Avatar for handrews3583
0
215
Member Avatar for Egypt Pharaoh

[url]http://blogs.msdn.com/excel/archive/2008/04/10/understanding-floating-point-precision-aka-why-does-excel-give-me-seemingly-wrong-answers.aspx[/url] Probably a precision problem. There is no error, it is just a side effect of using binary digits to store certain values.

Member Avatar for kvass
0
113
Member Avatar for Geekitygeek

I think that the way Dani has chosen to do the rep system is good. The fact that some members seem to have gotten the short end of the stick isn't the whole story: if Dani changes the rep system in certain ways, then the only thing that will change …

Member Avatar for Geekitygeek
0
185
Member Avatar for Taner Paul

The funniest thing about Ancient Dragon's post is that the google search's second result is this thread. :)

Member Avatar for BestJewSinceJC
0
34
Member Avatar for Olliepop

A more feasible way to decide which array to store it in would simply be to use if statements to decide. So [CODE]if (myString.equals("arrayName")){ arrayName[someIndex] = someData; }[/CODE] Other than that, you could look at the Java Class called "Class" and use some of those methods. Take a look in …

Member Avatar for Olliepop
0
106
Member Avatar for The Dude
Member Avatar for PedroStephano
0
92
Member Avatar for ceyesuma

You should only init your JTextFields [I]once[/I] in the entire program. Therefore, it doesn't make sense to call initJTextFields from within your showKey method. You should init the JTextFields when the GUI is first created, then you should .add() them to your JPanel. Here is an example to help you. …

Member Avatar for ceyesuma
0
87
Member Avatar for karol989

[URL="http://kenai.com/projects/jogl/pages/Home"]Java Bindings for Open GL[/URL]

Member Avatar for BestJewSinceJC
0
48
Member Avatar for DemonGal711

Because you linked us to an entire document instead of summarizing what you're trying to do and why you're having trouble. Anyway, I looked through it for you, all you should need to do once you're finished is send an email to your school email address. If it eventually gets …

Member Avatar for BestJewSinceJC
0
200
Member Avatar for llemes4011

Since E extends GEObject, therefore anything which answers true to being an instanceof E will also be an instanceof GEObject. So why don't you just change that line to [CODE]if (o instanceof GEObject)[/CODE] Also, what are you actually trying to accomplish here (code like yours is seldom necessary - I'm …

Member Avatar for ~s.o.s~
0
354
Member Avatar for LiquidScorpio81

[CODE]for (side3 = 3; side3 <= 3; side3++) [/CODE] has no effect whatsoever other than setting side3 equal to 3. As far as looping, it does nothing.

Member Avatar for stevelg
0
96
Member Avatar for unli25

[URL="http://ww[U]w.gnu.org/s/libc/manual/html_node/Finding-Tokens-in-a-String.html"]Read about strtok[/URL] which tells you what function to use to separate a string into tokens. Then use [URL="http://www.opengroup.org/onlinepubs/007908799/xsh/atoi.html"]atoi[/URL] to try to parse the string as an int.

Member Avatar for WaltP
0
112
Member Avatar for beanboy
Member Avatar for Bemani_lover

It looks to me like you're using DataInputStream and FileInputStream properly. Where are you getting stuck? Is it doing anything from the setText line?

Member Avatar for BestJewSinceJC
0
237
Member Avatar for BestJewSinceJC

My book says that interrupt chaining is a "compromise between the overhead of a huge interrupt table and the inefficiency of dispatching to a single interrupt handler." I understand how the interrupt vector table works & why dispatching to a single interrupt handler is worse than choosing from an array. …

Member Avatar for BestJewSinceJC
0
194
Member Avatar for xxunknown321

You said System.out.println(s) which prints your Scanner Object. Shouldn't you be saying [CODE]System.out.println(test.toString());[/CODE]

Member Avatar for BestJewSinceJC
0
168
Member Avatar for beforetheyknew

[QUOTE=beforetheyknew;1151384] Im also having a problem with when i create and put objects in the collection i use the key (above 502146) which is the registration of the object how can i set that to the registration within the collection? (when i print out the collection the registration is null). …

Member Avatar for BestJewSinceJC
0
86
Member Avatar for meowbits

You can also use scannerInput.nextLine() to grab an entire line of text. I don't understand what exactly you're trying to do though. If you give us some short sample inputs, and tell us what you want to happen after those inputs are read in, that would be helpful...

Member Avatar for meowbits
0
192
Member Avatar for jtodd

How could the remainder of 2/3 be higher than 2? [url]http://www.icoachmath.com/Controls/Remainder.html[/url]

Member Avatar for jtodd
0
746
Member Avatar for The Dude

And apparently other people like to up three year old threads on forums. Who would've thought?

Member Avatar for coloradoboy2
0
414
Member Avatar for DifficultUsrnme

Use code tags. The button is right there on your reply box. It says 'code'. That way we will know what line you are talking about.

Member Avatar for BestJewSinceJC
0
130
Member Avatar for Wraithmanilian

If you go by most medals it was the U.S. If you go by most gold medals I think it was Canada.

Member Avatar for vegaseat
0
143
Member Avatar for lllllIllIlllI

Hard to believe that you're only 16. You've accomplished quite a lot .. I look forward to continuing to see you around the site! :)

Member Avatar for BestJewSinceJC
0
292
Member Avatar for carolinehua
Member Avatar for anders10

The game ends because you closed the socket between the client/server pair and because you have no while loop or other loop structure to facilitate each player taking turns. And I don't see why you're asking whether each should be a client or a server. You can't run a client …

Member Avatar for BestJewSinceJC
0
143
Member Avatar for babylonlion

All you did was post your project description and your code. [url]http://java.sun.com/docs/books/tutorial/essential/concurrency/procthread.html[/url] Read through this tutorial. Threads can cause problems and be challenging, but the basic principles are very usable.

Member Avatar for BestJewSinceJC
0
147

The End.