1,678 Posted Topics

Member Avatar for it2051229

Then please ask your question in a separate thread. Yes it is possible and yes I know how to do it, but I just won't answer if you hijack 2 year old threads.

Member Avatar for rincethomas33
0
160
Member Avatar for peterwalter

Can you give a [I]short[/I] example text file, and tell us how the records would be created for that text file? Because the design that your teacher gave you makes no sense. Why would you pass the name of a text file to 'Concordance' only to pass the same name …

Member Avatar for helpmehelpme
0
255
Member Avatar for J.Killa

[QUOTE=jon.kiparsky;1389248]I'm not sure Exceptions are your best bet here. They might be, but think carefully about what you want. Here's an example of a WRONG use of exceptions, which I've actually seen in production code. Never do this: public boolean isNumeric(String s) [CODE]{ try{ Integer.parseInt(s); return true; } catch (NumberFormatException …

Member Avatar for J.Killa
0
251
Member Avatar for muncher10

You have to pass your tire pressures as parameters to the constructor. You also have to modify your constructor so that it will take the parameters, and you also have to set your Pressure class's instance variables to the values you pass in when you call the constructor.

Member Avatar for BestJewSinceJC
0
82
Member Avatar for serkan sendur

I enjoyed Slumdog Millionaire, it was emotional in some parts, although I doubt it will be life changing or anything like that...

Member Avatar for ronnieaka
0
1K
Member Avatar for 47pirates

You could set both the maximum and minimum size, although there may be a better/different way of doing it. setMaximumSize() setMinimumSize() in Javadocs.

Member Avatar for hanvyj
0
184
Member Avatar for BestJewSinceJC

Apologies if you already know about this/it isn't a problem for other people, but the banner at the top consistently covers up the Software Development drop down for me. Just letting someone know. Thanks :)

Member Avatar for Dani
0
53
Member Avatar for Sunshineserene

Using ArrayList as a raw type isn't a good idea. You can use Java generics to enforce type checking. In other words you can change it to [ICODE]ArrayList<Double> list = new ArrayList<Double>();[/ICODE] in order to allow only Doubles in the list. That being said, you can use the Double class's …

Member Avatar for BestJewSinceJC
0
6K
Member Avatar for neo_31591

edit: I could be totally wrong, but I see nothing wrong with your code. Did you use the check on s.execute to verify that the query was successful? It returns 'true' if there are results. I see you used a similar check by checking if the ResultSet was null though. …

Member Avatar for neo_31591
0
2K
Member Avatar for Beornhelm

IndexOutOfBoundsException typically means that you attempted to access an index of an array, but the index you tried to access was greater than the highest index of the array. So somewhere in the getStringArray method this is happening, although you didn't post that method's code.

Member Avatar for Taywin
0
408
Member Avatar for Lxyslckr

If you want help ask a specific question. At the very least, point us to a part of your assignment requirements that you don't understand how to implement and ask for clarification. If you don't understand the entire assignment, that's fine, but explain what you don't understand, why you don't …

Member Avatar for Eric Cute
0
218
Member Avatar for toferdagofer

My inclination would be to have a class variable(s) that track the Mouse position. The way you could do this is by setting up the variables to track x, y position and in the MouseMoved method, first you'd update those variable, then you'd call repaint() which causes paint() to be …

Member Avatar for BestJewSinceJC
0
120
Member Avatar for BestJewSinceJC

Anybody here a fan of Chuck? I'm a pretty big fan - behind at the moment, but I've seen every episode except the last two. Giving our geeky hero superpowers was a risky move on the show's part, but it is still entertaining so far. I also liked his third …

Member Avatar for SgtMe
1
305
Member Avatar for nellyznell

Make sure to put break after each part of the switch statement. And the reason it's telling you num1 and num2 are wrong is because you declared them from within one part of the switch statement, but then tried to use them within a different part of the switch statement. …

Member Avatar for CLina
0
1K
Member Avatar for javajavajava
Member Avatar for lykathea

Can you explain your reason for putting Integers and Characters in the same array? Also why you'd want a "DoubleStack" ?

Member Avatar for lykathea
0
117
Member Avatar for jems5

In your new String, either "LHS" or "RHS" represents an Index which is no longer valid. Since replacing whitespace with "" makes your string shorter, your index is no longer valid in the new string. In your new string, which is shorter than the old string, more than likely the …

Member Avatar for jems5
0
3K
Member Avatar for Ancient Dragon

[QUOTE=WaltP;1127168]Why? Why not get a computer from a reputable place that actually will give you service and put everything you need into the computer rather that an off-the-shelf this-is-what-we-got solution? And without all that extra crap software, too. In case of problems, do you get the M$ OS cd's so …

Member Avatar for dexter737
0
164
Member Avatar for zortec

Apologies if this has been stated, but I saw something about craigslist: Do not buy a car on craigslist. If you insist on doing so, at least compare the prices to other similar cars (according to make & model) and make sure the craigslist one isn't outrageously cheaper. And never …

Member Avatar for dexter737
0
361
Member Avatar for ana12

mm m, I like to add a little salt, herbs, and sig spamming in my pasta dishes! Delicious!

Member Avatar for dexter737
-11
325
Member Avatar for happygeek

[QUOTE=BLuv;1318537]russia being at the top of the list doesn't surprise me. they have a whole cyber army for goodness sake. (as does china i believe) where's the U.S.'s cyber army? =P[/QUOTE] In their Mom's basement

Member Avatar for dexter737
0
598
Member Avatar for peterwalter

Show us what you've got for your recursive function and why you're having difficulty.

Member Avatar for dierobe
0
414
Member Avatar for PDB1982

Yes. The HashMap class's add() method takes an Object as a parameter. As you can see in the Java language specification, arrays are Objects. See: [url]http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html[/url] [url]http://download.oracle.com/javase/1.4.2/docs/api/java/util/HashSet.html[/url]

Member Avatar for JamesCherrill
0
98
Member Avatar for lilsmurf

In this scenario, you are trying to make sure an Integer is in a certain range. So use a while loop and continuously prompt the user for a value until they enter one that is in the correct range. Generally, when you anticipate an event (such as an Integer that …

Member Avatar for BestJewSinceJC
0
200
Member Avatar for matt4682

If you're in a method, which you have to be, you could say "return;". I wouldn't worry about it too much if you have a working method though.

Member Avatar for matt4682
0
132
Member Avatar for rocky2008

From what I remember, essentially, they both dynamically (while the program is running) allocate memory for your program, and the main difference is that calloc sets all the memory (that it allocates to your program) to zero's while malloc does not. So after calling malloc, the memory that was set …

Member Avatar for surendra verma
0
177
Member Avatar for meowbits

Your Project class should have an ArrayList (or some data structure) to hold Employees in it. That way you will know what Employees are working on what project. As far as the Assignment class, I don't really understand what your teacher has in mind for what an Assignment actually [I]is[/I]. …

Member Avatar for goonj
0
166
Member Avatar for samuel17

Look at your brackets. You can't put a for loop in the middle of a class definition. It has to be inside of a method. On line 21, you put a '}' that closes your main method. Then you defined a method "getCourse()" and afterwards, you have a bunch of …

Member Avatar for Akill10
0
183
Member Avatar for sciprog1

Please don't ask unrelated questions in the same thread. Create a new thread with the appropriate title. That is, unless the questions (or answers to those questions) directly cause new problems. As for your actual question, have you tried using the setVisible(true) method? You may need to call a method …

Member Avatar for sciprog1
0
102
Member Avatar for Kimmelivim

Use an if statement. [CODE] boolean firstGuess = true; long totalTimeMillis = 0; if (firstGuess){ ... } [/CODE] That should get you started

Member Avatar for Kimmelivim
0
167
Member Avatar for rob3097

I don't see how your catch statement could possibly generate that error. You misaligned your code. Where in the code does the error actually occur?

Member Avatar for hmho
0
141
Member Avatar for notuserfriendly

That third post sounds about right, though I admit I haven't read all of your code. Let us know if you have any trouble. Welcome to the forums :)

Member Avatar for notuserfriendly
0
149
Member Avatar for jems5

Why would you declare "k" as type float? It should be declared as an int. Also, the ";" at the end of the for loop ends the loop. In other words, the for loop does not apply to the line directly after it since the ";" is there. Repost the …

Member Avatar for BestJewSinceJC
0
123
Member Avatar for girlinwayside

They mean make a method that has a parameter, numberOfEggs, which is an integer.

Member Avatar for stultuske
0
2K
Member Avatar for BestJewSinceJC

Oracle Certified Professional Java Programmer was formerly known as the Sun Certified Java Programmer certification. Does anyone know if the switch to Oracle has changed anything significantly, such as the questions that will be on the test? Or is it the same cert with a new name? The reason I …

Member Avatar for prashantpatel
1
140
Member Avatar for tedmyers

Your program is stuck in an infinite loop. You said [CODE]while(number != -1)[B];[/B][/CODE]. Notice the ";". That causes the program to think "oh, the ; represents the end of the while loop". Remove that symbol and see what happens. You also never changed the value of [I]number[/I], so even after …

Member Avatar for tedmyers
0
174
Member Avatar for Premsathishbe

Explain your problem better. It sounds to me like the command prompt is trying to tell you that the command line utility you're trying to use doesn't actually exist or cannot be found basically. But I'm no expert. Edit: To add to that I think there is a way in …

Member Avatar for agugglez
0
102
Member Avatar for daudiam

[QUOTE=daudiam;1335799] ob is an array which is also treated as an object, and hence has a default clone method which is called at (1). But the default clone method returns an Object reference, so that should not be assignable to an array of type hello. But its being assigned here …

Member Avatar for daudiam
0
228
Member Avatar for Coach_Nate

I have two family members that bought Acer computers at around the same time. This was less than two years ago; neither computer is being used anymore - they both had to buy new laptops because of crappy parts. Basically the screen completely separated on my dads and I don't …

Member Avatar for 11thlogin
0
1K
Member Avatar for Sabryan
Member Avatar for BestJewSinceJC

Hi everyone, I'm in a situation where I would like to have a ServerSocket that listens on a specific port. However, if this port is already taken, I would like to listen on a different port. How can I advertise what port my Java program is listening on, so that …

Member Avatar for masijade
0
142
Member Avatar for radioman28

OP: As a college student, when I go to career fairs and similar events, and talk to employers, the languages that are most often mentioned are C++ and Java as far as non-Web development goes. I don't know about web development. . AJAX seems to be popular as well as …

Member Avatar for ocmseo
0
668
Member Avatar for Garee

Methods. Keep in mind that a method should do one thing and do it well. Some of your code can be broken down better; for example, you should have a method which gets [I]one[/I] judge's score and another method that calculates the overall total score. The overall method would call …

Member Avatar for JamesCherrill
0
86
Member Avatar for ramjeev

No, there is no logic behind that. Why use a programming language if you're forbidden from using any of its features? But the question is intriguing.. How is the input read in without any Java API? Do you actually mean [I]no[/I] Java API methods are allowed? Or are certain ones …

Member Avatar for jon.kiparsky
0
219
Member Avatar for BestJewSinceJC

[CODE] Integer i = 5; Integer j = 5; if (i == j) System.out.println("true"); [/CODE] ^ Prints true [CODE] Integer i = new Integer(5); Integer j = new Integer(5); if (i == j) System.out.println("true"); [/CODE] ^ Does not print true. I understand that in the second case, the == is …

Member Avatar for BestJewSinceJC
0
109
Member Avatar for Nikkie80

[QUOTE=Nikkie80;1198260] 1. What is your current job title? Professional student 2. What education requirements did you earn to prepare you for this job? I passed some classes. They let me take more. 3. What are the advantages/ disadvantages to this career choice? You pay someone, you don't get paid. 4. …

Member Avatar for jerryvn01
0
171
Member Avatar for kulrik

So which part are you confused about? Reading in the values? Calculating the formulas? The formulas are standard formulas, so if you don't get them, just look up those terms on google and you'll find plenty of explanations. Your professor didn't make those up. And to read in the values, …

Member Avatar for tong1
0
237
Member Avatar for Ancient Dragon

Lol. That girl is a lunatic. Thankfully, my gf will not play any video games that aren't Mario Kart or Kingdom Hearts, and she rarely plays those.

Member Avatar for IT cllge stdnt
2
152
Member Avatar for wonderland
Member Avatar for BestJewSinceJC

I read on various articles on google that a 'cron job' is used to schedule a task to run periodically on a server. I'm in a situation where I need to schedule a script to run nightly. The script would probably be written in php and update a MySQL database. …

Member Avatar for rch1231
0
94

The End.