I am trying to figure out how to print one element of a linked list.
how do I get an element frome the part list and print just the one element out?
Code:
public void printOne() throws IOException
{
System.out.println("Part stock number (press 0 to end): ")';
stockNumber = conIn.nextInt();
skip conIn.NextLine();
/* I have tried creating a dummy object similiar to removing from a linked list
but I cannot get it to print
*/
// the object takes an int, String, int, and double
dummy = new Part(stockNumber, " " , 0, 0.0);
part.toString(dummy);
}
Comment