Search:

Type: Posts; User: Parranoia

Page 1 of 7 1 2 3 4

Search: Search took 0.12 seconds.

  1. Re: in CSS on General Assembly's Dash course

    This isn't Java related
  2. Replies
    4
    Views
    122

    Re: Need help making "Mother May I" program

    Well the code you've posted won't even compile so you have a bit more of a problem. What is your knowledge of Java like? Do you know the basic structure of a program? It helps to break down questions...
  3. Replies
    7
    Views
    63

    Re: Synchronized is blocking

    I'm not too sure about your syntax


    public T getSomeWork() {
    synchronized (getwork) {
    return iterWorkList.next(); //This gives some work/work info to the calling...
  4. Re: Why doesn't my if condition work when I compare two strings?

    Having example code would really help to figure out what is going on, but to help you do need to use the equals method when comparing two strings with each other.
    Also note that "asdf" is not equal...
  5. Re: String counter doesn't count the appropriate strings properly

    Well there is a bit of an issue with your for loop


    for (int counter=0; counter<=10; counter++)

    You are wanting to cycle through the strings you just split up, but you do not have 10 of them...
  6. Replies
    3
    Views
    111

    Re: Simple java program help please.

    After using the last sc.next() there is still some data left in the buffer. You need to clear the buffer after calling next()
  7. Replies
    2
    Views
    41

    Re: Help add something to my code please.

    You could set done equal to true...
    Or you could use a break statement to short circuit the loop
  8. Replies
    4
    Views
    99

    Re: Maximum size of Collections

    Using get is not the only way to access members of a collection


    for (String str : list)
    // Iterates through each String element of the list
  9. Replies
    12
    Views
    83

    Re: Valid ticket id

    There is also another problem in the second for loop


    for (i = 0; i > id.length() - 3; i++)

    even correcting it


    for (i = 0; i < id.length() - 3; i++)
  10. Replies
    12
    Views
    83

    Re: Valid Ticket

    You should look up regular expressions. It will help you immensely with this.
    Specifically, the matches method of the string class: matches(java.lang.String)
    Regular Expressions: Pattern (Java...
  11. [SOLVED] Re: Debugging homework assignment/ questions surrounding partially filled arrays

    Most likely you may need to clear the buffer after reading in the double. This is a pretty common issue when using scanners.
  12. Replies
    3
    Views
    54

    [SOLVED] Re: Arrays nightmare

    What exactly are you looking for as a result? Also, what have you gotten so far as a result?
  13. Re: Need some help with a tick tack toe game

    Well when you print out your game board you never actually check what is inside your board and print it out
  14. Replies
    18
    Views
    57

    Re: Rectangle keeps getting faster

    You might not need to call the repaint() method at the end. That may be rendering the scene a second time when it is called.
  15. Replies
    4
    Views
    94

    [SOLVED] Re: String Builder questions

    Well you will need to iterate through each row and column to achieve that.

    Something like this would work


    for (int i = 0; i < r; i++)
    for (int j = 0; j < c; j++)
    ...
  16. Replies
    2
    Views
    79

    [SOLVED] Re: Find the lowest number

    Well, initially your lowest score is set to 0. Unless you enter a number less than 0, your for loop will not find anything "lower"

    Setting the highest and lowest scores should be done after you...
  17. Replies
    18
    Views
    57

    Re: Rectangle keeps getting faster

    It's a problem when converting between doubles and ints. You are losing precision when you subtract 0.1 then convert the result to an int. If my memory is correct, I believe when Java converts to an...
  18. Replies
    18
    Views
    57

    Re: Rectangle keeps getting faster

    Well, we can't really help you if you don't show us any code pertaining to how you are moving the shape about
  19. Replies
    4
    Views
    290

    [SOLVED] Re: Tax calculation program

    The only thing you could check is that barack and obama are actually whats being stored in the array.

    In your for loop just try adding a debugging message like


    System.out.println("First: " +...
  20. Replies
    2
    Views
    45

    Re: My modulus result is wrong.

    Are you sure you're using the modulus operator like you expect?


    convert = convert % 1;

    after this statement convert will always equal 1 such that convert >= 1
    When convert is < 1 convert...
  21. Re: Need help on how to tackle this Java Project.

    You could always brute force it and calculate each possibility and find out which one is the best solution
  22. Replies
    4
    Views
    152

    Re: Counting duplicates in a Stack

    I'm not sure that would work quite right as it isn't gathering duplicates from throughout the stack, it is only gathering consecutive duplicates.
  23. Re: Need help on how to tackle this Java Project.

    Well just having some code to look at would help us point you in the right direction.
  24. Replies
    3
    Views
    164

    Re: Help With Filters Java Programming

    I assume he is referring to the new Java 8 filters.
    What a filter does is takes a stream of objects and checks for the condition you gave it. If the condition is true, it will be returned in the new...
  25. Re: I am not sure what else do I need to complete it

    When you declare a method each parameter must be given a type. There are some instances where you did not specify a type like


    public static double triArea
    (double base,heig);
    {
    ...
Results 1 to 25 of 164
Page 1 of 7 1 2 3 4