Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Question related to "Identifier expected "error

807606Mar 16 2007 — edited Mar 17 2007
i have a simple class something like this
public class ChainingHashTable{



hashNode test_node = new hashNode();
test_node.key=222;


public class hashNode{
private Object data;
private hashNode next;
private int key;

public hashNode(){
data=null;next=null;key=0;
}




}
i was just testing my node by putting some integer value into key..and
i get an error at 'test_node.key=222;' .. it says identifier expected...

what am i doing wrong?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2007
Added on Mar 16 2007
6 comments
123 views