This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

It compiles but only part of it runs.

 
Paul Roberts
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a total beginner I'm working through a long tutorial. I've decided that I won't move onto the next topic until I understand the

code in the current topic and have seen it run. I have merged two pieces of code from the tutorial. The main method calculates and

prints the number of occurrences of randomly generated numbers from 0 to 9. This part works. However additional code which is

meant to identity largest and smallest elements doesn't seem to do anything. There are no errors when I compile.

If someone would point out why static void printLargestAndSmallestElements (int[] n) { doesn't work in this instance I would be

grateful.

Sorry I haven't highlighted the relevant code. When I try to use the features on this page it just prints text.




[Edit - added code tags - MB]
 
Matthew Brown
Bartender
Posts: 4549
8
Java Netbeans IDE Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If that's the complete code you're using...the reason printLargestAndSmallestElements doesn't do anything is that you don't actually call it anywhere.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic