About 181,000 results
Open links in new tab
  1. Java Code Snippets for Everyday Problems - Squash

    Oct 2, 2023 · Optimizing Java code snippets can improve performance and efficiency, especially for code that is executed frequently or deals with large datasets. Here are some techniques to optimize Java code snippets for everyday problems:

  2. parsing incomplete Java source code - Stack Overflow

    In certain problem I need to parse a Java source code fragment that is potentially incomplete. For example, the code can refer to variables that are not defined in such fragment.

  3. 20 Very Useful Java Code Snippets For Java Developers · GitHub

    Mar 19, 2022 · Java code to parse above XML. import javax.mail.*; import javax.mail.internet.*; * of the old array to the new array. * @param oldArray the old array, to be reallocated. * @param newSize the new array size. * @return A new array with the same contents. // …

  4. 3 Troublesome Java Snippets You Should See - Medium

    Nov 11, 2022 · Let’s dive into these Java troublesome snippets. Enums could become a bottleneck if they’re frequently used. One example is HttpStatus : HttpStatus.resolve allocates HttpStatus.values () once...

  5. 10 Useful Code Snippets for Java Developers - FROMDEV

    Jan 20, 2025 · Whether it’s managing databases, handling exceptions, or working with large data, having practical code snippets handy can save time and reduce errors. Here are 10 essential Java snippets tailored for common enterprise scenarios. 1. …

  6. 20 very useful Java code snippets for Java Developers

    May 13, 2009 · Following are few very useful Java code snippets for Java developers. Few of them are written by me and few are taken from other code reference. Feel free to comment about the code and also add your code snippet. [ad#singleblogtop …

  7. GitHub - java-code-help/java-snippets: Collection of reusable …

    Inspired by 30 seconds of code, this is a collection of reusable tested Java code snippets.

  8. 3 Common Java Bugs and Worst Java practices | Javarevisited

    Feb 7, 2022 · Every Java developer knows how to handle NullPointerException. You’re right, they should know. Even so, we see bad Java code in projects. Here are some bad Java examples and how to fix them.

  9. 9 Bad Java Snippets To Make You Laugh - Dev Genius

    Apr 25, 2021 · Here are 9 bad code snippets. Explaining in detail why they matter. 1. Pass more than 255 arguments. You don’t see a method with more than 4 params. On a bad day, over 5 params. Do you think this is common practice? Wrong, there are still questions about the number of parameters. 2. Call the Object’s constructor. There’s no need for adding super().

  10. Essential Code Snippets Library for Java Developers

    Access a wide range of Java code snippets for implementing design patterns effectively. Our library offers ready-to-use examples to help you improve your coding and design skills.

Refresh