#JavaDev içeren gönderiler

#JavaDev

X'te #JavaDev kullanan herkese açık gönderiler.

İlgili etiketler

  1. Mario Casari✓@mario_casari
    💡Java: Prefer delegation over inheritance; an "is-a" relationship ties you to the superclass forever ✅ A subclass inherits the parent's entire API; a change upstream can break your code ✅ With delegation, you hold a helper object and forward calls; easy to mock #JavaDev 🧵
    İndir
    35441.1K
  2. Mario Casari✓@mario_casari
    🚀 Spring Boot: To make your services return a paginated response, instead of a giant list, you can use Page<T> and Pageable. #SpringBoot #JavaDev 🧵A link to an example to follow:
    İndir
    2121053.7K
  3. Mario Casari✓@mario_casari
    Java tip: Starting from Java 9 you can use Stream.takeWhile() for easy slicing of lists by streams. #Java #JavaDev
    İndir
    310923K
  4. Mario Casari✓@mario_casari
    💡Spring Boot tip: Use TaskScheduler to implement lightweight dynamic tasks (consider Quartz for more complex requirements). #SpringBoot #JavaDev 🧵Text example to follow:
    İndir
    210732.4K
  5. Mario Casari✓@mario_casari
    🚀Java: Starting from Java 14, you can use records to create short, immutable, data-carrying objects. ✅ They are shorter than ordinary POJOs ✅ They have built-in equals(), hashCode(), toString() ✅ They are immutable by default #JavaDev #Records
    İndir
    09641.8K
  6. Martin Hock@mnhocktweets
    🚀 JUnit 5 Tip 🚀 Since JUnit 5, leverage package-private visibility for classes and methods to enhance encapsulation in your tests. This helps keep your testing logic close to the code it's testing while maintaining a clean and organized codebase. #JUnit #Testing #JavaDev
    İndir
    17683.8K
  7. Mario Casari✓@mario_casari
    🚀 Spring Boot: You can use the " property to let Hibernate handle batch inserts. 🟢Fewer network calls 🟢Less JDBC overhead 🟢Faster bulk operations #SpringBoot #JavaDev
    İndir
    07721.7K
  8. Mario Casari✓@mario_casari
    💡 Spring Boot: Better avoid logging inside tight loops, since you could affect the application performance and flood log files. #SpringBoot #JavaDev
    İndir
    23611.9K
  9. Mario Casari✓@mario_casari
    💡 Java tip: Collectors.toMap(...) will throw an error if your keys collide. Always consider a merge function. #Java #JavaDev
    İndir
    06641.5K
  10. Mario Casari✓@mario_casari
    🚀 Spring Boot: If your code uses RestTemplate, you can implement tests by mocking external calls with MockRestServiceServer. ✅ MockRestServiceServer works by intercepting HTTP requests #SpringBoot #JavaDev
    İndir
    111972.6K
  11. Mario Casari✓@mario_casari
    💡 Java tip: From Java 9 you can use Objects.checkIndex(...) to replace manual if checks for validating index bounds. ✅It is a small feature that helps making the code cleaner. #Java #JavaDev
    İndir
    26731.9K
  12. Mario Casari✓@mario_casari
    Java Tip 💡: Use Files.walk() to recursively process files in a directory. #Java #JavaDev
    İndir
    016863.2K
  13. Mario Casari✓@mario_casari
    Java tip : Starting from Java 19 you can explore a feature called "virtual threads". ✅ Virtual threads are lightweight threads managed by the JVM rather than the OS. #Java #JavaDev
    İndir
    114983.7K
  14. Mario Casari✓@mario_casari
    🚀 Java: Use ReentrantReadWriteLock Java concurrence utility if you have to deal with frequent reads and fewer writes. #Java #JavaDev
    İndir
    112922.5K
  15. Mario Casari✓@mario_casari
    Java tip💡: If you have a list of elements, you want to remove duplicates, and sort them in natural order or by a custom comparator, you can use TreeSet. #Java #JavaDev
    İndir
    08792K
  16. Daha fazla gönderi göster