• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Program Hanging  RSS feed

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having problems with a program hanging on a class method and I am not sure if it is caused by an infinite loop or something else. Here is the method.


studAns[i][j] is a double matrix containing 8 students(i), each with 10 answers(j).
answerKey[j] is a single matrix containing 10 answers(j).

I have no problems compiling the code, and I get no errors when running the program, it just hangs. After looking at the method I could not discern any problems with it, and I have checked and double checked and I know that this is the method on which the program hangs.
 
author and iconoclast
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anything in the body of this loop have any effect on the loop condition?


I believe you just want an "if" rather than a "while" -- you only need to increment the score once for any given combination of "i" and "j".
 
Jason Rod
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh great, that worked, thanks a bunch.
[ May 22, 2006: Message edited by: Jason Rod ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!