|
-
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?
-
Oct 3rd, 2005, 05:52 AM
#2
Re: need help in java
You need to respect capitalization, and you need to put methods inside the class. Also, what is "click" for?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|