Jon Campbell

Greenhorn
+ Follow
since Nov 21, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jon Campbell

The following code compiles, but I don't have any documentation on how to use the "enum" structure. I cant find any info on it in my books or Sun's language documentation...

class Test {

enum eone {
Plus { int operate(int x) { return ++x;} },
Minus { int operate(int x) { return --x;} }
}


public static void main (String[] args){
System.out.println("eone="+eone.Plus);
}

}
17 years ago
The following code compiles, but I don't have any documentation on how to use the "enum" structure. I cant find any info on it in my books or Sun's language documentation...

class Test {

enum eone {
Plus { int operate(int x) { return ++x;} },
Minus { int operate(int x) { return --x;} }
}


public static void main (String[] args){
System.out.println("eone="+eone.Plus);
}

}
17 years ago
Taking a Java test I found a for{} loop which had a : character in it?... like this...

for { : }

I was supposed to fill in some objects, but I have no idea how a : character does in a for loop?

Any comments?
JON
17 years ago
I can add nodes to my JTree, but after expanding a node, I can not add any child nodes to that node, or at least they dont show on the screen? Actually I can use the .add(new DefaultMutableTreeNode("Label")); to add a node to a parent node, but the new child node doesn't show on the display of the JTree?

Any help appreciated,
Jon
17 years ago
I've got an Applet that you can paste an image into on the client browser, and I've got IP Sockets communication with the server working, but how do you send the Image over the Socket stream?

Thanks much,
Jon