Search:

Type: Posts; User: ProgrammablePeter

Search: Search took 0.25 seconds.

  1. Replies
    0
    Views
    102

    [SOLVED] Searching a Stach

    Not sure how to implement this. I basically want to search a Stack for a particular Object value

    Could someone provide an example of how to achieve this. Plain english? Possibly some PSUEDO
    ...
  2. Replies
    2
    Views
    109

    Re: Replacing Node Value

    public Node replace(Object data, Object value) {
    Node current = head;

    while(current != null) {
    if(current.getData() == data) {
    current.setData(value);
    return current;
    }...
  3. Replies
    2
    Views
    109

    Replacing Node Value

    Hey Guys, Could somebody point me in the right direction to replacing a node in a linked list?

    I have no clue on where to start, thus. I have no code to supply.

    I current have, a destory...
  4. Re: How to get an Array of US cities?

    Cheers, I've used that way. Didn't realise I could do it from a text file, added them now. Cheers Kevin!
  5. How to get an Array of US cities?

    Is there a way in my preferred JAVA IDE (Eclipse/Netbeans) in which i can construct an array of US Cities. I'm creating a Tree in which the user can select a runnable server. So in this case, the...
  6. Commenting your code: RIGHT or WRONG way?

    From an experienced Programmers point of view, or any level of Programers point of view. What would be a right way of commenting your code. What should I note and what should I note? Is too much...
  7. Replies
    7
    Views
    212

    Re: Problem with Scanner

    Just out of curiosity what operating system are you running? 32-bit/64-bit?

    --- Update ---

    Wow that is super weird, I downloaded the file from pastebin that I uploaded and then slammed it into...
  8. Replies
    7
    Views
    212

    Re: Problem with Scanner

    database.txt - Pastebin.com

    Thanks for helping man, appreciate it!
  9. Replies
    7
    Views
    212

    Re: Problem with Scanner

    That made it alot better, but still. I added a counter, notepad++ says there is 998 lines and the counter says there is 610 lines, 300 lines of the text file is missing! So frustrating!
  10. Replies
    7
    Views
    212

    Problem with Scanner

    So I have a text file which is 47 kb big, it includes database information.

    Basically I have a problem the scanner only seems to output up to a random line and then completely stop.

    Scanner x...
  11. Re: Input Validation - Take no Symbols or Numbers

    Not very helpful. I already know I need a while loop. But, I just don't know where it should be, or how it should be structured≈...
  12. Input Validation - Take no Symbols or Numbers

    So what I'm trying to do is take String input and validation to the following correspondences:

    1. Take no Digits "1234567890"
    2. Take no Symbols/Special Characters "!@$%^&*()"

    OUTPUT FROM...
  13. Problem with converting Numbers to Words! Kindly ask for help:(

    So the theory is, convert a number to the worded value. 1 = ONE 2 = TWO 3 = THREE etc.. If user enters anything over 5 then display the numerical value of its type. The problem is this:
    The output...
  14. Need help with formatting output - PLEASE HELP :(

    Basically all I'm after is to be able to format a String that is inputted by the user:

    For example:

    My code would look something like this:


    public class TestData {
    public static void...
  15. Re: Need help with making code more efficent! - PLEASE HELP:(

    Okay, thank-you for your advise. Greatly appreciated! and I have no idea why i'm passing in the variable premium when i'm changing it in the method. I study Computer Science 1st year, and we have...
  16. Re: Need help with making code more efficent! - PLEASE HELP:(

    Haha, thank-you. Sorry about that :/
  17. Need help with making code more efficent! - PLEASE HELP:(

    So basically, I am developing a program to calculate Annual and Monthly premiums for Insurance.

    I am a beginners level Java Programmer. Studying Computer Science. and here is my code.


    ...
Results 1 to 17 of 17