background preloader


Facebook Twitter

Java Idioms. Painlessly Migrating to Java Jigsaw Modules - a Case Study. Key Takeaways Implementing applications in a modular fashion encourages good design practices, such as separation of concerns and encapsulation.

Painlessly Migrating to Java Jigsaw Modules - a Case Study

The Java Platform Module System (JPMS) lets developers define what the application’s modules are, how they are to be used by other modules, and which other modules they depend upon. It is possible to add JPMS module definitions to applications that were already using a different system to define the application’s modules, e.g. Maven modules or Gradle subprojects. The JDK comes with tools to help developers migrate existing code to JPMS.

This article demonstrates a case study of the changes needed by a real application in order to make use of the new Java Platform Module System (JPMS). I’ll walk through the steps I took to refactor a Java 8 application, which was already organized in a modular fashion, to use the new Java module system. Download Java 9 Firstly download and install the latest version of JDK 9. Modularity. How to master Java? Java head data structure - Buscar con Google. Difference between mvn install, release and deploy in Maven. Even though there are a couple of powerful build and deployment tools that exist for Java applications e.g.

Difference between mvn install, release and deploy in Maven

Gradle or ANT, It seems Maven is the king of them. I have used in several Java projects over the years and it was initially ANT, but now they all use Maven with few Scala projects using Gradle. When you work with Maven you know that there are lots of commands to remember, especially if you are working on the command line. The thee Maven build commands which often confuses Java developers are mvn install, mvn release, and mvn deploy. Many Java developers are never sure which one put the artifact on the remote repository, local repository, and tag the source code in SCM like SVN. Btw, if you are just starting with Maven, I suggest you to first go through a comprehensive Maven course like Apache Maven: Beginner to Guru to learn some fundamentals.

Maven Install Command: mvn install The local repository is the local cache where all artifacts needed for the build are stored. In short,


How to convert int to String in Java – the fastest way. In this article, I show you how to convert an int into a String in Java the fastest way.

How to convert int to String in Java – the fastest way

The answer is probably surprising for some. I present four variants and measure and compare their speed using JMH microbenchmarks. I analyze the measurement results looking at the Java source code and also the generated bytecode. If you want to skip the details, you can use this link to scroll down directly to the result. Akullpp/awesome-java: A curated list of awesome Java frameworks, libraries and software.

Java doc

Interview. JMH. Java - Difference between JVM and HotSpot? GC. Java's Binary Search API in Five Minutes - SitePoint. Binary search is a very efficient search algorithm that finds an item in a sorted array by repeatedly cutting down the search range by half.

Java's Binary Search API in Five Minutes - SitePoint

As a result, run time is logarithmic, or O(log n). This post teaches you how to use Java’s Arrays.binarySearch and Collections.binarySearch for searching sorted arrays or array lists considerably faster than you could using the linear search methods like a for loop or List.contains. At a minimum, only working knowledge of arrays and lists is required. Knowing about Comparable and Comparator comes in handy.

Desing patterns

Au coeur du JDK : expliqué simplement. 16 janv. 2012 Je suis surpris par le nombre de développeurs qui s'avouent intimidés par le package

Au coeur du JDK : expliqué simplement

Il est vrai qu'il contient beaucoup de classes, dont la plupart portent des noms très similaires, mais nous allons voir que son architecture est en réalité très simple. Il suffit de comprendre deux concepts pour y voir tout de suite plus clair : le schéma en 4 quadrants, et le pattern Decorator. Le premier permet de déterminer à quoi sert une classe ; le second indique son rôle dans la chaîne de lecture ou d'écriture des données. Suivez le guide ! Les 4 quadrants.


Exceptions. Sommaire complet. Concurrence. Java 15 est sorti. Ce 15 septembre 2020 sort Java 15.

Java 15 est sorti

C’est l’occasion pour cette dépêche de revenir sur les nouveautés entre les blocs de texte et autres ramasse‑miettes. Online tests. Snailclimb/JavaGuide: 「Java学习+面试指南」一份涵盖大部分Java程序员所需要掌握的核心知识。准备 Java 面试,首选 JavaGuide! Iluwatar (Ilkka Seppälä) TheAlgorithms/Java: All Algorithms implemented in Java. ReactiveX/RxJava: RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM. Doocs/advanced-java: □ 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识,后端同学必看,前端同学也可学习.


Méthode en paramètre. Cheat Sheets - Thoughts on Java. DB. Gradle vs Maven Comparison. Spring. Lombok. Better-Setter-Getter. I must confess that it's very difficult to bring myself to write code with a long life expectancy in an alternative JVM language.


Scala is slowly taking over and that's great. But if I'm working on an API, an open general purpose one, or some "important" layer within a system, the thought of not using Java doesn't even cross my mind. Not that those other languages are not good. But anyway, in this post I just wanted to complain that I'm tired of seeing, let alone writing getters and setters for bean properties. Since first-class properties don't seem to be on the table for Java, can we at least come up with a better naming convention? But let's start with the 'getFoo'/'setFoo' pair. Public class Customer { private String email; public void setEmail(String email) { = email; } public String getEmail() { return email; } } That convention is ugly and verbose. The difference between: and this: is not just a matter of taste. Trail: Collections: Table of Contents (The Java™ Tutorials)

Streams & Lambda

Java Magazine, May/June 2019.