-
Replied To a Post in Difference between prefix and post fix operator
I don't understand that question, sorry. -
Replied To a Post in How to Eliminate FIs and elses
If you have have if (instance of A) do A's version of something... if (instance of B) do B's version of something... then that's usually a sign that A and … -
Replied To a Post in A very simple program but a very irritataing error
getSource is a method, so the syntax is `if (r.getSource() == abtn)` Fot getting the text fro a text field and updating a text field you can use the `getText()` … -
Replied To a Post in A very simple program but a very irritataing error
r is defined as an ActionEvent (line 25) and ActionEvents do not have a getText() method, so that's why the compiler can't find it. Probably what you want to do … -
Replied To a Post in A very simple program but a very irritataing error
OK, I posted the code for you (just clicked the "code" button and pasted it in!). Now, what exactly are the two errors you referred to? -
Replied To a Post in comparing a scanner string obj to a string obj
I can't see any problems in that code. Are you *certain* that the nodes are being populated correctly with the names and links? -
Replied To a Post in Any ideas for me on why my program is not running correctly?
^ well spotted, but that description not quite exactly correct - "Supplies" is a reference variable, not an object. The code creates 7 objects, and keeps changing the reference variable … -
Replied To a Post in Any ideas for me on why my program is not running correctly?
7 works because on lines 32-36 you print all its fields explicitly. For the others you use `System.out.println(Supplies);` This is all about the toString() method... Every Java class inherits a … -
Replied To a Post in A very simple program but a very irritataing error
Code posting does work - start your message, click the code button you should see a new window in which you can post your code. If that's not working can … -
Replied To a Post in Difference between prefix and post fix operator
The loops are confusing this. Try a simpler example int i = 1; System.out.println(i++); System.out.println(i); int j = 1 System.out.println(++j); System.out.println(j); -
Replied To a Post in Sudoku Solver
9 is number of cells in each row/col/block. Each entry in the array is a cell number. Eg row 1 consists of cells 0, 1, 2, 3...8 If you don't … -
Replied To a Post in Sudoku Solver
just for fun, and for people who say Java is slow... that code for checking completness of the whole grid (but with the R/c/b blocks as a class for clarity) … -
Replied To a Post in How to get all member varible values in bean class
You can use the `java.beans.Introspector` class to get the `BeanInfo` for your bean. Then use the `BeanInfo` to get the `PropertyDescriptors`. That gives you an array of all the properties, … -
Replied To a Post in Sudoku Solver
Yes. I assume you are thinking of variable-sized boards as having more blocks of the same size? If so, checking the rows/cols may be O(sqrt(n)), but checking the 3x3 is … -
Replied To a Post in help for this code
There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in … -
Replied To a Post in Online user list and private message problem
What you are asking for is a lot simpler than the code you already have, so why are you finding it difficult? (You did write that code from scratch, didn't … -
Replied To a Post in Sudoku Solver
I wonder if I didn't explain my original proposal very well because it imposes zero overhead on changing cell values. At the risk of boring everybody (stop reading here if … -
Replied To a Post in Sudoku Solver
Hi Hiroshe I think you may be over-elaborating this. Discussion of execution scaling would be appropriate to a project of "arbitrary sized games like sudoku", but I don't think that's … -
Replied To a Post in Make Rectangle Disappear After Collision
It's a bit of a cludge, but why not move b1 to some place way out of the picture? -
Replied To a Post in Sudoku Solver
allRCBs lists the cells that are part of each row/col/block. The members of the arrays are cell numbers. The cells array holds the actual numbers 1-9 (or "empty"). To understand … -
Replied To a Post in Final project (Array data structure )
DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules … -
Replied To a Post in Sudoku Solver
Just because Soduku is displayed in a 2D grid that doesn't mean you have to store it internally like that. And there are very good reasons why you shoudn't. You … -
Replied To a Post in pattern program
I want a Clapton special edition black Fender Stratocaster. You get me my stratocaster and I'll do your homework for you. If that's not possible then maybe you should read … -
Replied To a Post in Benefits of Java virtual machines in the development/deployment of
This is not a homework service. What do YOU think the benefits are? -
Replied To a Post in margeSorting
That's mergesort, not margesort. That's probably why you had trouble finding it on Google. Anyway, Google "mergesort" and you'll get a huge range of tutorials that explain it. [This one](http://www.codenlearn.com/2011/10/simple-merge-sort.html) … -
Replied To a Post in Java ClassNotFoundException: net.ucanaccess.jdbc.UcanaccessDriver
> ClassNotFoundException: net.ucanaccess.jdbc.UcanaccessDriver that message is pretty explicit. After extracting fromn the zip file and adding to NetBeans librray, do you have the jar that contains net.ucanaccess.jdbc.UcanaccessDriver.class in the list … -
Replied To a Post in Combination Lock
You should incorporate Taywin's point and test for `size >= 3` The problem may never happen with this application, but that kind of "defensive programming" is a good habit to … -
Replied To a Post in Java ClassNotFoundException: net.ucanaccess.jdbc.UcanaccessDriver
UCanAcess-2.0.6-bin.zip looks like a distribution package - you need a .jar file. Start by expanding the zip and look for the jar file -
Replied To a Post in Java ClassNotFoundException: net.ucanaccess.jdbc.UcanaccessDriver
Never do this when writing new code: } catch (Exception e) { } If/when there is an error you just told Java that you didn't want to know anything about … -
Replied To a Post in Some issues with My ComboLock
Highly highly unlikely that you have found a new bug in System.err.println after all this time. System.err is intended for logging system error messages for the developer/administrator, not for messages … -
Replied To a Post in null in my 2d array
OK, I just had a couple of idle minutes and read the whole code. There are no null chars (see above), but you do have references that are null, and … -
Replied To a Post in null in my 2d array
Can you explain what you are trying to achieve, recognising that there's no such thing as a null char? -
Replied To a Post in null in my 2d array
You need to look more closely... there is no such thing as a null char in Java. What exactly are you seeing? -
Replied To a Post in Multi chat application hang
As a guess: Your run method contains an infinite loop, so if you call it directly it will never return and the calling program will be frozen. So you need … -
Replied To a Post in Merge two text files and count number of characters.
You may not want to use that code for a number of reasons including: Copying someone else's code for your homework is cheating It corrupts the data by discarding the … -
Replied To a Post in BufferReader input in Java
Have a look at the Oracle tutorials, starting here: http://docs.oracle.com/javase/tutorial/essential/io/streams.html -
Replied To a Post in Overriding
Builder_1: DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" … -
Replied To a Post in Looking for assistance please - I am stuck on a Java assignment
Please don't give up. Programming isn't easy, but it is logical, and you will get there if you work at it in a logical organised way. -
Replied To a Post in Java xml parser isn't working correctly
Is that XML correct? shouldn't <Account AccountNumber="1234567890"> be <Account> <AccountNumber="1234567890"> given how you are parsing it? -
Replied To a Post in Looking for assistance please - I am stuck on a Java assignment
I could fix your code. But if you handed that in you would be cheating and get an automatic fail. (Remember that your instructor may read this site as well!) … -
Replied To a Post in GUI Java program to convert temperatures from Fahrenheit to Celsius and f
The message is pretty self-explanatory. It probably refers to the degree symbols on lines 63 and 75 (there may be others as well) because there is no degree symbol in … -
Replied To a Post in Looking for assistance please - I am stuck on a Java assignment
Yes. Your instructor has given you good advice. It's not easy to get nested loops right at first. The simplest and most useful thing is to ensure your indentation is … -
Replied To a Post in Looking for assistance please - I am stuck on a Java assignment
You get the name *before* you enter the loop, so that's only executed once, at the start of the program. Your main two options are: 1. repeat lines 21/22 just … -
Replied To a Post in Need help for the multichat application with client and server
I'm sorry, but you have posted hundreds of lines of undocumented code with no apparent overall structure, multiple main methods, multiple declarations of variables with the same name, code that … -
Replied To a Post in Need help for the multichat application with client and server
Unless there's a duplicate declaration of out somewhere, that implies that the `actionPerformed` has been called before `run` gets to line 61. Maybe it's hanging on the `new Socket` or … -
Replied To a Post in Need help for the multichat application with client and server
That's not enough of the code to see why a variable should still be null, but for starters try printing `out` and `txtmsg` just before that line to see which … -
Replied To a Post in Bank program help
If you want to fix the problem then yes, of course, you will have to change the code. Yourr methods are designed to take the old balance as a parameter … -
Replied To a Post in java is not purely oops language,if its true then why?
Of course there's no absolute universal definition of Object Oriented, so there's no definitive answer ot this question either. *Personally* I worked with SmallTalk before getting into Java, and SmallTalk … -
Replied To a Post in Clear Screen In Java
By "screen" do you mean the console window, as in System.out? If so, be aware that the console output device may be to a printer or a sequential file, in … -
Replied To a Post in BufferReader input in Java
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); System.out.print("Type name: "); String name = reader.readLine(); System.out.println("Hello " + name); System.in is the InputStream associated with the console. You create a BufferedReader using …
The End.