Search:

Type: Posts; User: srs

Search: Search took 0.07 seconds.

  1. Replies
    5
    Views
    3,741

    Re: Compare instance of a class to another

    So the short answer is use .class for the known, existing object?
    So for my use it may look something like this:

    if (incomingObject.getClass() == map[0][0].class()) {
    // Note the null check is...
  2. Replies
    5
    Views
    3,741

    Re: Compare instance of a class to another

    Thanks for the instancoof suggestion. By it's name, I thought it would work, but seems this is not so.
    class Parent {
    public Parent() {
    }
    }
    class Child extends Parent {
    public Child() {...
  3. Replies
    5
    Views
    3,741

    Compare instance of a class to another

    I have an incoming object of an unknown class (null possible). I need to test if the object is of a specific class.
    if (incomingObject.getClass() == map[0][0].getClass()) {
    // go go go!
    }...
  4. Replies
    3
    Views
    1,686

    [SOLVED] Re: Class constructor default values

    lol @ me
    I guess I should actually read things when I press the preview button...

    Thanks for the reply. :)
  5. Replies
    3
    Views
    1,686

    [SOLVED] Class constructor default values

    Suppose the following class:


    public class Sample() {
    private int xPos, yPos;
    private int xSize = 10;
    private int ySize = 10;
    // - -
    Sample(int xPos, int yPos, int xSize,...
  6. Replies
    2
    Views
    3,121

    [SOLVED] Re: acm.util.ErrorException: Cannot find image named

    acm package's GImage as follows:
    GImage deck = new GImage("CARD_DECK_BASIC.jpg");

    I am learning more and more about awt's Image class and it seems a better way to go. Perhaps for now I should...
  7. Replies
    2
    Views
    3,121

    [SOLVED] acm.util.ErrorException: Cannot find image named

    I am using Eclipse Galileo. I have a class that should display a deck of cards face down but the image for the card is not found at runtime. I first placed the image inside a folder named "images"...
  8. Thread: Greetings!

    by srs
    Replies
    1
    Views
    928

    Greetings!

    Hi, I am srs.

    I would say my average personality would include the following smilies:
    8-} =)) :o) <:-P and of course, the one which brought me here, :confused:

    So hi to everyone who loves...
Results 1 to 8 of 8