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...
Type: Posts; User: srs
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...
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() {...
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!
}...
lol @ me
I guess I should actually read things when I press the preview button...
Thanks for the reply. :)
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,...
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...
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"...
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...