buildLinkedListNode - = new buildLinkedListNode();...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//Johnny import javax.swing.*; import java.lang.*; import java.util.Scanner; import*; import java.text.*; import java.math.*; import java.text.DecimalFormat; import java.lang.String; import java.text.NumberFormat; i public class buildLinkedListNode { public int info; public buildLinkedListNode link; public static void main(String[] args)throws FileNotFoundException, IOException F { Scanner mack = new Scanner (new FileReader("f:\\linklistdatafile.txt")); buildLinkedListNode list1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: = new buildLinkedListNode(); buildLinkedListNode first, last, newnode; first = null; last= null; l System.out.println("The linked list is as follows: "); for(int i=0;i<=9;i++) { newnode = new buildLinkedListNode(); int num = mack.nextInt(); = num; = null; if(first==null) { first = newnode; last = newnode; } else { = newnode; last = newnode; } System.out.print( + " "); } System.out.println(); } }...
View Full Document

This note was uploaded on 06/17/2011 for the course COMPUTER S 2301 taught by Professor Staff during the Spring '11 term at Kennesaw.

Page1 / 2

buildLinkedListNode - = new buildLinkedListNode();...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online