|
-
Oct 2nd, 2005, 01:40 PM
#1
Thread Starter
Junior Member
need help in java
i have one exercise where i need to write a method with three parameters. the first parameter is a head reference for a linked list of integers. and the next two parameters are integers x and y. the mehod should write a line to System.out containing all integers in the list that are between the first occurrence of x and the first occurrence of y.
here is the code i written so far.
public class IntNode {
private int data;
private int click;
private intnode link;
}
public IntNode (int initialData, int initialClick, IntNodeLink){
data=initialData;
click=initialClick;
link=IntNodeLink;
}
do i need to make any changes?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|