Question: Using the following class, use a reference - based Queue and do the following operations: 1 . Add 5 0 to the Queue
Using the following class, use a referencebased Queue and do the following operations:
Add to the Queue
Remove a node from the Queue
Add to the Queue
public class PrintNode
private String job;
private PrintNode link;
public PrintNode
job null;
link null;
public PrintNode String job
this.job job;
link null;
public PrintNodeString data, PrintNode link
this.job data;
this.link link;
public void setLinkPrintNode newLink
link newLink;
public void setDataString newData
job newData;
public PrintNode getLink
return link;
public String getData
return job;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
