Search:

Type: Posts; User: siid14

Page 1 of 3 1 2 3

Search: Search took 0.13 seconds.

  1. Replies
    0
    Views
    172

    Why is the test failing? Out

    I'm working on a Web Server project and I'm trying to pass a test. It keeps failing so far.

    Test


    package tests.webserver667.responses.writers;

    import static...
  2. Replies
    3
    Views
    2,200

    Re: java.util.NoSuchElementException error

    Indeed. It worked. I put Scanner object out of the loop and put a input.close; instead of using try resource.

    --- Update ---

    so @Norm -- what is the issue when "a new Scanner object is created...
  3. Replies
    3
    Views
    2,200

    java.util.NoSuchElementException error

    I have this output :



    [1, 2, 3, 4, 5, 6, 7, 8]
    Enter a number : 4
    3
    Enter a number : Exception in thread "main" java.util.NoSuchElementException
    at...
  4. Replies
    0
    Views
    941

    Dictionaries - Two values with same key

    I'm working on a problem where I have to set up a dictionary with keys and values. I implemented Google Guava to use multimap.
    My issue is that I do not know how to set up two different values for...
  5. Replies
    5
    Views
    1,417

    Re: cannot be resolved to a type

    From the original post, I only corrected the driver about the "cannot resolve error" that does not appear anymore now. So it is fixed.


    import java.util.Scanner;

    //
    // - Do not change the...
  6. Replies
    5
    Views
    1,417

    Re: cannot be resolved to a type

    I fixed the cannot resolve the error, thanks for the help on that point.
    I fixed it by writing : "StackInterface<Character> myStack = new OurStack<>();"
    With OurStack the class that implements...
  7. Replies
    5
    Views
    1,417

    cannot be resolved to a type

    I have this code where I'm trying to implement the isPalindrome method using Stack but I get a "cannot be resolved to a type". What to understand from that and how to fix it?

    Here is my output
    ...
  8. Replies
    13
    Views
    1,194

    Re: Getting variable from another class

    Can you give me a line code example ? with the 'this'?
  9. Replies
    13
    Views
    1,194

    Re: Getting variable from another class

    So you mean that I can call csc220Bag within my removeAllOccurence knowing that this is declared in the driver class?

    Cause if I try to call it into the removeAllOccurence, I get an cannot...
  10. Replies
    13
    Views
    1,194

    Re: Getting variable from another class

    Actually, when I review the code, you are right. aBag is an argument to a method.
    In fact, I think the content that I'm trying to work on comes from the csc220Bag that you can see into the void...
  11. Replies
    13
    Views
    1,194

    Re: Getting variable from another class

    "public class LinkedBagCSC220JavaDriver" is the aBag object
    "public final class LinkedBag<T> implements PrimaryDataStructureBagInterface<T> {" is the removeAllOccurence class

    you can see...
  12. Replies
    13
    Views
    1,194

    Re: Getting variable from another class

    within "private static void testAdd(PrimaryDataStructureBagInterface<String> aBag) {". The content of aBag in there is what I'm looking to work on in my removeAllOccurence method.
    If I pass this...
  13. Replies
    13
    Views
    1,194

    Re: Getting variable from another class

    but it means modify my driver right? (notice that I cannot modify it as I stated)
  14. Replies
    13
    Views
    1,194

    Getting variable from another class

    I'm working on implementing a code where the output I'm looking for is the following



    === LINKED BAG 220 JAVA ==========================================================
    [+] Creating a CSC220...
  15. Replies
    9
    Views
    1,154

    Re: Adding element to Linked List

    I figure it out, using a package extension in VSC
  16. Replies
    9
    Views
    1,154

    Re: Adding element to Linked List

    Okay, I see. Also. quick question, were you able to compile the code. Cause as. it is when I try it says :


    LinkedBagCSC220JavaDriver.java:32: error: cannot find symbol
    private static void...
  17. Replies
    9
    Views
    1,154

    Re: Adding element to Linked List

    I wanna know if I'm right with my understanding of my first concern
  18. Replies
    9
    Views
    1,154

    Re: Adding element to Linked List

    Just added the interface class
  19. Replies
    9
    Views
    1,154

    Adding element to Linked List

    I'm trying to understand the behavior of on how the elements of a String[] contentsOfBag are added into a linkedbag which is csc220bag (for this programming case).

    First concern: from my...
  20. Replies
    2
    Views
    1,356

    Re: Static vs Instance

    Y. DANIEL LIANG
  21. Replies
    2
    Views
    1,356

    Static vs Instance

    I have two statements that I would like examples/deep explanations on.

    Here there are :

    (1)
    "Always reference static variables and methods from a class name (rather
    then a reference...
  22. Replies
    1
    Views
    1,447

    Index -1 out of bounds

    Can someone explain that error? I do not get what they mean by saying "Index -1", I don't have such an index in my code ??



    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:...
  23. Replies
    10
    Views
    1,020

    Re: Printing ArrayList

    @AngleWyrm, where could i get more ressource about the format of the code you use on the last line to learn?
    Seems very useful
  24. Replies
    3
    Views
    1,448

    Re: Convert Array to LinkedList

    Are you telling me that I perfectly converted my array into a linkedList but your point is that it is an LinkedList of an Array of Int right.

    Is that what you telling me?
  25. Replies
    3
    Views
    1,448

    Convert Array to LinkedList

    I'm looking at how to convert an array of int numbers to a Linked list?

    Here is my take but it doesn't work


    int[] numbers = { 1, 4, 17, 7, 25, 3, 100 };
    Arrays.sort(numbers);
    ...
Results 1 to 25 of 63
Page 1 of 3 1 2 3