| Author |
Message |
|
|
It seems to me that there is no winner when there are no 3 X's or O's in a row (which you've done) and when the number of moves is over 9.
Also, I think you've done the hardest part of drawing the board and that's modeling the actual board in some data structure.
Now you just need to print everything out.
Since you're just getting started, i'd start out slow. For the first pass, i would just print out the 2d array you're using so it looks like:
X X X
O O O
X X X
the X's and Os won't always look like that, but i think you get the point. Once you get that far, i'd start adding in the rest of the lay out. Adding the 2
rows of '---' where they belong. Once you get that far, then add in the '|' where they go.
If you still have trouble, let us know and post what you've gotten so far.
|
 |
|
|
froz wrote:hmm..stil dont quite understand.do u mean the other refreshment label is for the 'numSelected'? if so then i do understand.and for the other 'array' can i use vector instead? cos im actually expected to make use of vector.but im not sure how to.it'll be great if u cud tell me how vector is used. thanx!!
Vectors are a legacy class and unless you're using an API that requires Vectors, you should really be preferring Lists or something similar in new code.
Here is a tutorial on how Lists work. Let us know if you run into any problems with the tutorial.
My last thing is I'm having trouble deciphering your posts. I'm probably one of the last people who can comment on grammar and spelling, but I'm starting to have issues understanding your posts.
|
 |
|
|
That depends on what you mean by help. If you're asking me to do it for you, then I will be unable to 'help' you. If you're willing to put in some time and work through the issues you're having then I'll be more than happy to help.
|
 |
|
|
what i need help wit:
-how to display number of seats(which seats selected)//i can only display the seat that is currently selected,when i click on another seat it changes the display.i need to show more than 1 seat display if more than 1 seat is selected.(now if i click on seat number3,it displays 3,when i click 5 is changes display from 3 to 5.i need it to display 3 AND 5)
-how to display total number of seats selected.(if 3 and 5 are selected it should display total 2 tickets)
-if else statement for the seat pricing.($8.50 each seat ,promotion $8.00 for 3 or more seats).please help me im in urgent need of ur help.. my email address is insanepredator07@hotmail.com.
Hi Welcome to HotJoe
What issues are you running into while you're trying to implement the above?
|
 |
|
|
I totally missed this posting before - sorry about that. Did you get this solved?
No worries, I don't remember writing this one!
restarting the server def fixes the problem (in the short term). There was a setting we had to enable/disable in weblogic to fix it for good. I'll see if i can't get more details on monday so we can update this for posterity.
|
 |
|
|
Yup,
I agree...again
I'd probably stay away from webopedia for java related (although i doubt the rest of their information now) knowledge. Unfortunately i didn't see a 'report bad definition' link or something similar.
|
 |
|
|
stdunbar wrote:I don't know if I agree exactly with that but a servlet is a Java class that runs in the context of an application server. .
I agree. Which site did you run across that had that definition?
|
 |
|
|
do i have to remove the VOID from the method?
The error is saying you can't return something when the method's return type is set to 'void'
the return type needs to be the same as the method's type
|
 |
|
|
[BEA][SQLServer JDBC Driver]No more data available to read. is the latest and greatest JDBC error I’ve gotten. I've posted some other threads on database related question in the past and I'm kind of at a junction where having a mentor at work would come in handy because i have a knack for finding connection handling (or lack there of) issues.
For the most part on the handful of apps I’ve built I use the following pattern to handle connections. As i progress through my apps and I mature as a developer it gets slightly more sophisticated, but here goes.
This code won't compile and obviously isn't complete (I’ll try and come up with a working example here in the next day or so)
Then in where ever i actually need a connection i do the following:
I'm in a j2ee environment so threading could be/is an issue here. Am I closing all my connections here?
Here's my understanding of what's going on.
connPing, pStatementPing & resultSetPing are created and stuff is done with them. Then a pass a copy of their reference to closeConnections().
Close closes the 3 objects, but the null assignment only affects conn, pStatement, & resultSet. When closeConnections() finishes running we go back to the of the finally and ultimatly out of pingDB()
I don't need to assign null to connPing pStatementPing, and resultSetPing since they drop out of scope (after being closed in closeConnections()) after the finally anyways.
So that's my understanding of what's going on. Assuming that the above is true and that I haven't confused myself (or anyone reading this ) I'm fairly confident that I'm handling my connections properly.
So now for this SQLException...I'm kinda clueless. I did the ol google and read a bunch of them and it seems like one of those fun errors that a decent amount of folks get and no one really knows what to do about it. The most popular answer is that the connections aren't being handled properly. I also saw a hit about weblogic being not being configured properly, and then finally someone thought it was a threading issue.
So i guess all this confusing inner dialog boils down to 2 questions.
Is using static methods in a different class to get & close connections okay in terms of proper connection management?
The second question would be any thoughts or solutions on this SQLException I'm getting.
|
 |
|
|
How are you going to tie this into a j2ee app?
As for which IDE to use, it doesn't matter. If you aren't familiar with either, then i'd say use what ever you are used to.
as for how to go about writing the code for this, check out the File class in the API. I believe swing has some classes that you might find useful. I haven't really done much in swing so i'm not sure what would be useful.
Let us know if you ahve any specific questions that we can help with.
Good luck!
|
 |
|
|
Run through this tutorial and let us know if you have any problems. It should walk you through all the steps to get java up and working.
If you make it through that one, get started on the ones here
Practice, practice, practice is the only secret to learning java. Don't expect to get it all figured out from reading one book or doing a few tutorials
Good luck!
|
 |
|
|
lmr wrote:Have just downloaded JDK 1.5.0_07 on PC with WindowsXP. Program compiles ok but I get the following runtime error:Exception in thread "main" java.lang.No ClassDefFoundError: I think I've tried just about everything under the sun and am running out of time to finish my assignment
Give this command a shot:
java -cp . (nameOfYourClass)
And let us know how it goes.
|
 |
|
|
woman wrote:i did that already but it does not work. i have db connection and txt file in the code and it shows some kind of error.
thank u anyway.
Perhaps if you provided a concrete (IE actual code) example of what you are trying to do will yield more help.
As for your error, what error are you getting? Also, i fail to see how a db and a text file have anything to do with passing data from one variable to another.
|
 |
|
|
Man, the semantics of this always get me
they get me too I think after 2 HeadFirst books i've just about gotten the gist of it.
|
 |
|
|
Java passes everything by reference...
Isn't java pass by value? As in it passes a copy of the value of a reference
|
 |
|
|