This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger
  • Mark post as helpful
  • send pies
  • Report post to moderator
The more information you provide, the easier it is for people to answer your questions. Consider these examples:


  • [not helpful] My program throws an error.
  • [better] My program throws a NullPointerException on line 13. Below is the code and the stack trace.


  • The better one provides the reader with everything he/she needs to know to answer your question. Helpful information, if applicable, includes:

  • Detailed description of problem
    • what you did
    • what you expected to happen
    • why you expected it to happen
    • why you need it to happen
    • what actually happened instead and
    • why what happened is a problem to you
  • Error message
  • Version numbers of relevant libraries, JDK, tools, operating system etc.
  • Code snippets
  • Stack trace
  • What else you tried/what worked/what didn't work


  • Don't take this as a checklist that you need follow though. It is rather meant as an inspiration on what might be interesting to the people who want to help you. Taking the time to present all of the relevant information demonstrates that you are willing to ShowSomeEffort when presenting your question. Doing so makes it much more likely that someone else will expend some effort to help you.

    It is also possible to provide too much extra information. For example, if you have a 500 line program, go through it and only post the relevant pieces. Try to narrow your problem down as much as possible.


  • [best] My program throws a NullPointerException. Below are the 10 lines of code that don't work. It should calculate the answer to the final question of life, the universe and everything. As you can see from the stacktrace, though, it is throwing the NullPointerException at line 4. I think that is because the mice aren't yet initialized, though I'm doing that in line 1. When I'm initializing them inside the loop (line 3), it runs without the Exception, but of course generates the wrong answer ("41"). I'm using the Universal Question Resolver 0.0.1 beta 3 on JDK 1.7.


  • Also take a look at our other tips on HowToAskQuestionsOnJavaRanch!


    See also

  • http://www.catb.org/~esr/faqs/smart-questions.html#beprecise
  • http://sscce.org/

  •  
    mooooooo ..... tiny ad ....
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
      Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!