Bookmark Topic Watch 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
There are times when a working example or code sample is the best way to explain a concept.
JavaRanch has no shortage of Java Sample Code for those times.

That being said, the best approach is often to show enough code to point the questioner in the right direction. Show the key part of a method or class, not the entire method or class (unless absolutely required). The value here is that someone else who later has a similar, but not exact, problem as the questioner will be able to extrapolate an answer for him or herself.

Do you think the questioner is asking you to do their homework? Read LetThemDoTheirOwnHomework about how to handle this.

If a questioner keeps pressing you to expand your original code or pseudo-code, you are not in any obligation to respond. If you feel that you have answered their question sufficiently, then you need not continue the thread.

Other valuable resources you can use are references to APIs, specifications, online articles, etc., but be aware that linkrot will render these meaningless.

Back to HowToAnswerQuestionsOnJavaRanch

See also:

  • DoYourOwnHomework
  • NotACodeMill
  • UseCodeTags

      Bookmark Topic Watch Topic
    • New Topic