About 1,850,000 results
Open links in new tab
  1. Newest 'java' Questions - Stack Overflow

    Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand; OverflowAI GenAI features for Teams; OverflowAPI Train & fine-tune LLMs; Labs The future of collective knowledge sharing; About the company ...

  2. java - What is a StackOverflowError? - Stack Overflow

    Oct 18, 2008 · A stack overflow is usually called by nesting function calls too deeply (especially easy when using recursion, i.e. a function that calls itself) or allocating a large amount of memory on the stack where using the heap would be more appropriate.

  3. How does a "stack overflow" occur and how do you prevent it?

    Aug 25, 2008 · Now, on older times stack overflow could occur simply because you exausted all available memory, just like that. With the virtual memory model (up to 4GB on a X86 system) that was out of the scope so usually, if you get an stack overflow error, look for …

  4. callstack - What causes a java.lang.StackOverflowError - Stack …

    Jul 7, 2010 · The running out of space on the call stack is known as overflow. This is because we are trying to use more stack space than we have and the data literally overflows the stack. In the Java programming language, this results in the runtime exception java.lang.StackOverflow and will immediately halt the program.

  5. How does Java handle integer underflows and overflows and how …

    Jun 8, 2010 · Java doesn't do anything with integer overflow for either int or long primitive types and ignores overflow with positive and negative integers. This answer first describes the of integer overflow, gives an example of how it can happen, even with intermediate values in expression evaluation, and then gives links to resources that give detailed ...

  6. multithreading - Threads in Java - Stack Overflow

    2 days ago · Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! But avoid … Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great ...

  7. java - Uses for Optional - Stack Overflow

    May 4, 2014 · In Java 10 value types might further reduce or remove the penalty. Serialization. Optional is not serializable but a workaround is not overly complicated. Invariance. Due to the invariance of generic types in Java, certain operations become cumbersome when the actual value type is pushed into a generic type argument.

  8. Programming with Java for beginners - Stack Overflow

    Oct 17, 2010 · Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand; OverflowAI GenAI features for Teams; OverflowAPI Train & fine-tune LLMs; Labs The future of collective knowledge sharing; About the company ...

  9. exception - How can I handle StackOverflowError in Java? - Stack …

    If the melody represented a program's stack usage, a stack overflow could possibly occur at any of those five locations in the program's execution. In other words, the same underlying runaway recursion (musically represented by an ever-higher rendition of the melody) can manifest itself in five different ways.

  10. How do I declare and initialize an array in Java? - Stack Overflow

    Jul 29, 2009 · Number[] numArray = {1,2,3,4}; // java.lang.Number numArray[0] = new Float(1.5f); // java.lang.Float numArray[1] = new Integer(1); // java.lang.Integer // You can store a subclass object in an array that is declared // to be of the type of its superclass. // Here 'Number' is the superclass for both Float and Integer.

Refresh