Search:

Type: Posts; User: ajw1993

Page 1 of 3 1 2 3

Search: Search took 0.46 seconds.

  1. Replies
    3
    Views
    146

    Re: Apprending a print writer file

    doesnt matter know ive added a second print writer to do it and it works
  2. Replies
    3
    Views
    146

    Apprending a print writer file

    Im having trouble apprending a file which has to have a hash map plus have data before it. it only does one at a time

    if(customerMap.size()> 0)
    {
    PrintWriter nw = new...
  3. Replies
    7
    Views
    190

    Re: Print Writer Problem

    it has to be a hash map cz i will have to be able to get them later via the key. is there a way of doing it the way i want . n its not the map thats repeating its the other information.
  4. Replies
    7
    Views
    190

    Re: Print Writer Problem

    i need one piece of data to write once , followed by all data in a hashmap with out no replacing of the data beause all the data append each other
  5. Replies
    7
    Views
    190

    Re: Print Writer Problem

    well the data i want is in a map , but i need to have that in a loop to get them all , but have other data not repeat where it says ok i need that only once!
  6. Replies
    7
    Views
    190

    Print Writer Problem

    I need help on figuring out how to send data to a file without it replacing the data and also repeating other data. The code below doesnt replace any darta, but it repeats data that i want in there...
  7. Replies
    3
    Views
    180

    Re: Storing unique random numbers

    well u do a id by string followed by 6 random numbers then adds to the map . but how would u just add n not use it again
  8. Replies
    3
    Views
    180

    Storing unique random numbers

    Im trying to store random id's in my code , but im trying to figure out how to store only unique id's how would i do that ?

    public void storeCustomer (Customer newCustomer)
    {
    ...
  9. Re: Storing random numbers into a String field

    well the range is just between 0-9 , it depends on the parameter how many go into the string.
    The code only stores what string is in the parameter n the first generated number
  10. Storing random numbers into a String field

    Hello
    I need help on storing random generatored numbers into a string every time they get generated , im also to store the string i want , but not the amout of numbers that i select to be...
  11. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    through the scanner in a different class in a method . and also in the sub class it reads in additional data

    public void readData(Scanner scanner)
    {
    group = scanner.next();
    ...
  12. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    nothing is being read in
  13. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    there is data there though , all the vehicles have regNo's and its saying that on 112 that it cant find the regNo,.
  14. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    java.util.NoSuchElementException
    at java.util.Scanner.throwFor(Scanner.java:907)
    at java.util.Scanner.next(Scanner.java:1416)
    at Vehicle.readData(Vehicle.java:112)
    at...
  15. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    there should be 7 for the car , but it keeps coming up null and not storing anything and no it will follow a comment , blank lines then [Van data , then do the van data
  16. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    yeah ino but how do i record it n use the result .
  17. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    thats what the code is , thats why im confused
  18. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    the deal code will create an object , read in the data and also store it in the array
    else
    {
    Scanner scanner2 = new Scanner(lineOfText);
    ...
  19. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    thats what i think should work , when looking at the psuedo code =

    while ( there are more lines in the file)
    {
    lineoftext = nextline from scanner
    if (line start with //)
    {
    ignore
    }
    else if...
  20. Replies
    21
    Views
    260

    Re: Recording data , so you know whats next

    there is no problem yet because i just wanted to get this bit right first and it is else if(lineOfText.startsWith("[")

    just wondering what should i put

    --- Update ---

    there is no problem yet...
  21. Replies
    21
    Views
    260

    Recording data , so you know whats next

    I have a ptoblem i have 3 types of data in one file for example car data , van data , truck data. The problem is i have to have a flag to check what data is next and set a variable , so we know what...
  22. Replies
    5
    Views
    193

    Re: how to test a class ??

    there is no problem i was just wondering how i would create a class that woould do it
  23. Replies
    5
    Views
    193

    Re: how to test a class ??

    yeah i get that but i have to do it in another classes constuctor in the test class. like below i have to create a vehicle object in the class below's constuctor n store it , but in the test class ?...
  24. Replies
    5
    Views
    193

    how to test a class ??

    hey i need help on testing a class it is confusing me on how to do it i was wondering how would i do it.

    i need to create 3 objects in another classes constuctor n store them in an arraylist
  25. Re: setting a boolean in a field when being read from a file

    thank you man it works . can you do something else for me im just confused on how to write a test class on testing how to create 3 objects and adding them to an array list.
Results 1 to 25 of 68
Page 1 of 3 1 2 3