Win a copy of Rust Web Development this week in the Other Languages forum!
    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 ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven
  • 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

  •  
    Get off me! Here, read this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
      Bookmark Topic Watch Topic
    • New Topic