Search:

Type: Posts; User: FightingIrishman

Page 1 of 2 1 2

Search: Search took 0.11 seconds.

  1. Replies
    4
    Views
    5,593

    Re: A question about threading.

    But multithreading is possible? That's what's confusing me.
  2. Replies
    4
    Views
    5,593

    A question about threading.

    In the following code, when using the .yield() method, the main method doesn't appear to be a thread. So, Is the yield happening between methods that are calling the same class/object method i.e....
  3. Re: What is the function of the string in this statement?

    Ok. I'm sold. Cheers!
  4. Re: What is the function of the string in this statement?

    I'm learning from a book of example programs with very little explanation so I don't always have the technical language to know what I'm looking for.

    I'll bare in mind this API doc though, but...
  5. What is the function of this statement?

    Without the new keyword, I assume it's not creating an object.

    Is it just referencing whatever the Thread.currentThread() is?

    Would it be fair to say that this statement is just pulling a...
  6. What is the function of the string in this statement?

    This is actually two questions in one.

    #1 The string "thread1" at the end of line 1 of the following code - is this the name of the new MyClass created?

    #2 If the string is the name being...
  7. Cannot find symbol error in single package program with default access modifier.

    By my understanding, variables with default access modifiers are supposed to be able to be accessed from anywhere in a package, and if I'm not mistaken, a package means a single file? Or, does a...
  8. Re: What language would describe this code so that I can research it?

    That's hard to wrap the head around. Can you point me in the direction of any material to explain passing an obj of a class as an argument to another class?
  9. Re: What language would describe this code so that I can research it?

    Thanks Norm.

    So, if I said that obj1 is an argument that's being sent to a constructor of obj2, would that be correct?
  10. What language would describe this code so that I can research it?

    I'm wondering what is happening to the creation of the class named "obj2" when another object named "obj1" inside the parenthesis. What is the technical term or the language used to describe what's...
  11. Replies
    1
    Views
    3,997

    Question about threading.

    From what I can gather, the following code is supposed to execute each thread in a random order and different each time. For me the output is as if I'm not threading at all. First prints 5 times,...
  12. Replies
    4
    Views
    521

    Re: Problem with nested switch code.

    I haven't come across enum yet but it's ahead of me in the book I'm reading.




    Handy. Cheers!
  13. Replies
    4
    Views
    521

    Re: Problem with nested switch code.

    Green ball selected is just test code. The case of ball selection does nothing until an action for that ball is selected in the nested switch. I'm going to use a default case for error messages in...
  14. Replies
    4
    Views
    521

    Problem with nested switch code.

    I can't understand why the runtime appears to be completely ignoring the nested switch (act). I run the program and everything else runs fine but it's as if that part of the code isn't even there. It...
  15. Replies
    1
    Views
    559

    Error with binary operand.

    The error for the following code is:


    StringCharacter.java:13: error: bad operand types for binary operator '!='
    if(st.charAt(i) != " ")
    ^
    first type: char...
  16. Could someone give me the technical terms for the parts of this statement?

    This is to complete an abstract method from a sublass. I'd like to know what the technical term is for the words Animal and Dog in this statement. I know animal is the parent class and Dog is the...
  17. Could someone give me the technical terms for the parts of this statement?

    This is to complete an abstract method from a sublass. I'd like to know what the technical term is for the words Animal and Dog in this statement. I know animal is the parent class and Dog is the...
  18. Re: Are method parameters two way traffic?

    Is it true that with instance/non-static/object methods, parameters are two way traffic?

    Pardon me. I think I've realised that the answer is no.

    An object of an instance method can set the...
  19. Are method parameters two way traffic?

    Can I reset the arguments that are sent through the parameters, from inside the method itself?
  20. Do method variables get reset each time a method is used?

    The following code is part of a method that's used in a program I'm doing. The method is called by a loop so it is used multiple times. As the variables values are declared at the top of the method,...
  21. Re: At what point in a for loop does incrementation take place?

    That might be a bit beyond my expertise right now, but thanks for the info.
  22. Re: Why is this nested for loop not printing 5 spaces on the top line?

    Thanks mate. You're right, it was the "j>1" that was doing it.

    The code worked fine but I'm learning from example code so I was wondering what was making the spaces print one less than the input...
  23. Re: At what point in a for loop does incrementation take place?

    I was trying to understand the effect that the continue; keyword has.

    I think it actually increments when it reaches the closing of the loop though, because when I use continue to jump from an...
  24. At what point in a for loop does incrementation take place?

    Is it at the closing curly bracket, or is it when it gets back to the start of the loop for another repetition?
  25. A few questions about a line of code regarding an array.

    What does [i++] do?
    What does (int) do?



    sum[i++] = (int)((num1 % 10 + num2 % 10 + rem) % 2);
Results 1 to 25 of 26
Page 1 of 2 1 2