-
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?
-
Re: need help in java
You need to respect capitalization, and you need to put methods inside the class. Also, what is "click" for?