Click here to Skip to main content
15,920,673 members
Home / Discussions / Java
   

Java

 
QuestionjFuzzy logic or Matlab Pin
mesho27-Nov-10 7:37
mesho27-Nov-10 7:37 
AnswerRe: jFuzzy logic or Matlab Pin
Dr.Walt Fair, PE27-Nov-10 8:41
professionalDr.Walt Fair, PE27-Nov-10 8:41 
AnswerRe: jFuzzy logic or Matlab Pin
427748029-Nov-10 20:14
427748029-Nov-10 20:14 
QuestionFlatten or Merge PDF with PDFBox Pin
GlobX25-Nov-10 19:08
GlobX25-Nov-10 19:08 
AnswerRe: Flatten or Merge PDF with PDFBox Pin
Nagy Vilmos25-Nov-10 22:44
professionalNagy Vilmos25-Nov-10 22:44 
QuestionSorted Linked List [modified] Pin
Babylon Lion25-Nov-10 8:10
Babylon Lion25-Nov-10 8:10 
AnswerRe: Sorted Linked List Pin
TorstenH.25-Nov-10 19:54
TorstenH.25-Nov-10 19:54 
AnswerRe: Sorted Linked List Pin
Richard MacCutchan25-Nov-10 22:06
mveRichard MacCutchan25-Nov-10 22:06 
while (infile.hasNext())
{
    fName = infile.nextLine();
    lName = infile.nextLine();
    id = infile.nextInt();
    infile.nextLine();

    ...
}

Your call to hasNext() only returns true if there is a line ready to be read, it does not guarantee that there will be three lines waitng, so your code may well fail as you see.

BTW Please do not post your complete project in future, but just the lines relevant to the problem.
Just say 'NO' to evaluated arguments for diadic functions! Ash

GeneralRe: Sorted Linked List Pin
TorstenH.25-Nov-10 23:25
TorstenH.25-Nov-10 23:25 
GeneralRe: Sorted Linked List Pin
Richard MacCutchan26-Nov-10 0:50
mveRichard MacCutchan26-Nov-10 0:50 
GeneralRe: Sorted Linked List Pin
Babylon Lion26-Nov-10 16:59
Babylon Lion26-Nov-10 16:59 
AnswerRe: Sorted Linked List Pin
Luc Pattyn26-Nov-10 4:50
sitebuilderLuc Pattyn26-Nov-10 4:50 
GeneralRe: Sorted Linked List Pin
Babylon Lion26-Nov-10 16:54
Babylon Lion26-Nov-10 16:54 
GeneralRe: Sorted Linked List Pin
Luc Pattyn26-Nov-10 17:18
sitebuilderLuc Pattyn26-Nov-10 17:18 
QuestionCould not create system bitmap Pin
evan earnest25-Nov-10 2:09
evan earnest25-Nov-10 2:09 
AnswerRe: Could not create system bitmap Pin
TorstenH.25-Nov-10 2:58
TorstenH.25-Nov-10 2:58 
GeneralRe: Could not create system bitmap Pin
evan earnest25-Nov-10 18:53
evan earnest25-Nov-10 18:53 
QuestionHow do you build your GUIs? Pin
TorstenH.23-Nov-10 21:36
TorstenH.23-Nov-10 21:36 
AnswerRe: How do you build your GUIs? Pin
David Skelly23-Nov-10 22:13
David Skelly23-Nov-10 22:13 
AnswerRe: How do you build your GUIs? Pin
Cedric Moonen23-Nov-10 23:00
Cedric Moonen23-Nov-10 23:00 
GeneralRe: How do you build your GUIs? Pin
TorstenH.23-Nov-10 23:12
TorstenH.23-Nov-10 23:12 
GeneralRe: How do you build your GUIs? Pin
Cedric Moonen23-Nov-10 23:22
Cedric Moonen23-Nov-10 23:22 
GeneralRe: How do you build your GUIs? Pin
TorstenH.23-Nov-10 23:27
TorstenH.23-Nov-10 23:27 
AnswerRe: How do you build your GUIs? Pin
Nagy Vilmos24-Nov-10 3:18
professionalNagy Vilmos24-Nov-10 3:18 
AnswerRe: How do you build your GUIs? Pin
LloydA11125-Nov-10 7:50
LloydA11125-Nov-10 7:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.