jwenting 1,905 duckman Team Colleague

sounds like a career in management or marketing is in order. That's where all people who don't have a clue what they want end up.

jwenting 1,905 duckman Team Colleague

have you made sure you're running a 64 bit version on 64 bit Windows (if relevant)?
Might make a difference.

I've not heard of performance problems of Java applications running on W7 from colleagues using the OS (and we're a Java heavy development shop) so it's unlikely to be something generic to the combination Java/W7 (which of course doesn't exclude the possibility that there's some combination of applications/JVMs/OS variants that can be problematic).

You might try updating to 6u19 and see if that makes a difference, but it may not, there are some applications that just don't perform well on a 6.0 JVM (especially some older applications that make use of specific workarounds for bugs in 1.4 and earlier JVMs).

jwenting 1,905 duckman Team Colleague

don't try to do that with strings.
Check whether the actual amount (number!) is >1.0 instead, much easier.

And btw, you add 4 amounts there, not 3 :)

jwenting 1,905 duckman Team Colleague

You don't, since you quite obviously have never heard of inheritance, class hierarchies, etc. etc..
First learn Java well, then start thinking about meddling with things like creating customised GUI libraries.

jwenting 1,905 duckman Team Colleague

*code tags expected. Redo from start*

jwenting 1,905 duckman Team Colleague

That means that something isn't initialised properly before you call a method on it.
The exception will show what that is.

jwenting 1,905 duckman Team Colleague

what error? Where exactly?
Not going to read through hundreds of lines of code without at least a clear indication of what I'm looking for.

jwenting 1,905 duckman Team Colleague

not urgent at all...

jwenting 1,905 duckman Team Colleague

using raw types can be required at times, but this is not such a time.
All answers can be found in a decent tutorial and the JLS as usual.

jwenting 1,905 duckman Team Colleague

oh boy...

I'm pretty sure even an idiot book like yours doesn't tell you to do that.

jwenting 1,905 duckman Team Colleague

book originates with Java 1.1 I think, but may have had superficial updates over the last decade or so (like changing a few version numbers).

jwenting 1,905 duckman Team Colleague

too late now anyway, if it were really urgent.

jwenting 1,905 duckman Team Colleague

it's no matter of opinion at all. The God Class (which having one massive class is called) is known to be a very bad thing.
It's a well documented anti-pattern.

jwenting 1,905 duckman Team Colleague

not urgent.

jwenting 1,905 duckman Team Colleague

script it.
Way better approach. Other programs will need other libraries. Some probably need incompatible versions from others.
And if you distribute your program, you can distribute the libraries (if you're licensed to do so) and script so others can run it without having to mess with their system configuration (which they may not know how to do, not be allowed to do, or like many professionals may not want to do).

jwenting 1,905 duckman Team Colleague
java -classpath .;mysql-connector-java-3.1.12-bin.jar MyDatabaseProgramjava -classpath mysql-connector-java-3.1.12-bin.jar MyDatabaseProgram

would actually be required :)

jwenting 1,905 duckman Team Colleague

flush the stream, might do a lot of good :)

jwenting 1,905 duckman Team Colleague

So that's why the quality of newly graduated programmers is so poor.
They're now handing out exam assignments that would be considered too simplistic for a 1st week homework assignment at the beginning of a course.

jwenting 1,905 duckman Team Colleague

add the proper jars to the classpath of the application you're trying to run, the system classpath should hardly ever be used at all.

Not that you're using it now, you're adding the jar to the system PATH, not the CLASSPATH.

jwenting 1,905 duckman Team Colleague

I see more static methods than main, I usually just discard the code (maybe reusing snippets here and there to put into other methods).

jwenting 1,905 duckman Team Colleague

you need a method that takes an array and produces a String, so effectively the reverse of your original method.

This no doubt is what your teacher wants you to create!

And oh, using all static methods in a single class like that is considered Very Bad (tm) by professionals.
Were such code to arrive on my desk for review it would be instantly rejected.

MaxWildly commented: He help me see the answer in a clear way. +1
jwenting 1,905 duckman Team Colleague

seems to work just fine. The only thing you've not yet figured out is how to print the array in such a way you actually see what's in it.
That shouldn't be too hard :)

And then there's learning to write proper object oriented code of course.

jwenting 1,905 duckman Team Colleague

This is not urgent.

jwenting 1,905 duckman Team Colleague

Didn't get an answer instantly and decided to just post your question again, did you?

That's not going to make you friends, you know. Now noone will bother to look at your question and try to help.

jwenting 1,905 duckman Team Colleague

This is just basically trying to FORGET THE PAST and in my opinion: THE PAST WAS MUCH BETTER!! (The 80s mostly and before)

No, it's more like not rewriting the past to make it more "modern" :)
Most posts to old threads are of the "i wan hlp uregnt plz asap" kind by kids who never bothered to read the actual thread itself but had it pop up in some Google search and just append their homework question at the end rather than starting their own thread (and getting pounded for that ;) ).

jephthah commented: well put. +0
jwenting 1,905 duckman Team Colleague

the class changed, therefore any old serialised instances are now incompatible with the new class structure.

jwenting 1,905 duckman Team Colleague

Just use a commandline compiler and a text editor.

jwenting 1,905 duckman Team Colleague

it's simple:
1) determine how much of a homework kiddo the person is (in your case, that's 100%)
2) deduct that percentage from 100 to give the maximum IQ of the person (in your case, 0).

jwenting 1,905 duckman Team Colleague

have you even read the 5 year old discussion above?

Nick Evan commented: Let me guess: no? +0
jwenting 1,905 duckman Team Colleague

The drawbacks are mainly in code maintainability.
Everyone expects to find 1 class per source file, including most IDEs.

See the filename, you know what class is contained in it and vice versa.
Want to change a class? Change that file and all other classes are not touched. Ideal for version control purposes.

jwenting 1,905 duckman Team Colleague

JLS: Java Language Specification :)

jwenting 1,905 duckman Team Colleague

First rule: don't do it unless you're using inner classes
Second rule: see first rule

Third rule: if you insist, read the JLS for what's allowed and what's not.

jwenting 1,905 duckman Team Colleague

and anything that's easy AND popular won't pay much. After all, there's tons of people doing it and it's easy to learn so there's nothing special to it.

What pays well are things that are hard to do yet in demand, as there will be few practitioners at a high level of expertise.

jwenting 1,905 duckman Team Colleague

The problem is that you just list a few buzzwords yet don't seem to even know what they mean and haven't apparently gone to the trouble of figuring out what they mean.
That shows a lack of interest in doing your own work, which leads to us being disinclined to help you.

jwenting 1,905 duckman Team Colleague

no need to bring back old threads from the dead, kids.

jwenting 1,905 duckman Team Colleague

And most of that university research would be funded by those companies or government departments and the results heavily classified and not made publicly available for a combination of national security and economical reasons.

It's not urgent anyway, apparently neither is it to OP or he'd have done more than post a message here and wait for someone to do the work for it.

jwenting 1,905 duckman Team Colleague

do your own homework, kiddo.

jwenting 1,905 duckman Team Colleague

no, it wouldn't look weird.
The shell might be determined to fall short, go high, bounce off armour, the gun might misfire, be creative.

You're thinking way too linear here "if it fires in the right direction it always hits". Don't do that.
The random factor might introduce an inaccuracy into the firing solution, throwing off the aiming angle, gun elevation, etc., maybe having an influence on the quality control used in manufacturing the shell causing it to have a faulty propellant charge of firing pin, whatever can cause a weapon to fail.

jwenting 1,905 duckman Team Colleague

So put in a random number generator that decides whether the AI hits or misses.
Draw a number between 0 and 1 (most random number generators produce a floating point number).
If you want a 50% chance to hit, have it hit if the number drawn is >0.5, if you want a 25% chance to hit, have it hit if the number is >0.75.
That way you can even tune the AI accuracy, making the game easier or harder as you want even at runtime.

Another thing to consider is giving the AI only partial information about player positions.
You can't see AI forces hidden by terrain (I assume), so make it such that the AI can't see you either is you're hidden from it by terrain.

jwenting 1,905 duckman Team Colleague

Can't use fish to redirect http requests, they don't know what to do.

jwenting 1,905 duckman Team Colleague

thanx that would mess up the entire program lol

Well, commected out code won't give compiler errors :)

jwenting 1,905 duckman Team Colleague

we're not going to do your work for you.
What have you done already, and what specifically do you have problems with?
It's your project, so you'd better start learning about what you're supposed to do.

BestJewSinceJC commented: Here I was thinking he meant philosophical ontology.. haha +4
jwenting 1,905 duckman Team Colleague

And pretty much everything they tell you is fundamentally flawed.

jwenting 1,905 duckman Team Colleague

If roseindia says something, it's almost certainly wrong or at the very least highly inaccurate.

jwenting 1,905 duckman Team Colleague

Easy. But not the way you think it's done.
You can not mix text and binary output in a single http stream, it has to be 2 requests.
The JSP displays the text, includes a link to a servlet that serves the image.
Of course the JSP doesn't do anything at all with Java code, it just parses the data generated by another servlet.

jwenting 1,905 duckman Team Colleague

If your task was to design a system which was so easy to defraud, then you would be hard pushed to make it better than this.

UN oil for food program comes to mind?

Salem commented: Nice, that's a good one as well :) +0
jwenting 1,905 duckman Team Colleague

no help for homework kiddos and zombie masters

jwenting 1,905 duckman Team Colleague

no help for zombie master homework kiddos

jwenting 1,905 duckman Team Colleague

use a hashmap with the words as keys and the counts as values.
If you find a word in it, increase the count.
If not, add it with a count of 1.

Ezzaral commented: Agreed. Good suggestion. +10
BestJewSinceJC commented: As Ezzaral has pointed out, this is a correct solution. My apologies! +4
jwenting 1,905 duckman Team Colleague

he's also using the wrong jdbc driver