- Modular Programming in Java 9
- Koushik Kothagal
- 161字
- 2021-07-02 18:38:20
Traditional Java code structure
Traditionally, writing a Java application starts with creating one or more source directories. These are special directories that serve two purposes--firstly, they act as root locations of your Java source code and secondly, the contents of these directories are added to the class path. So, the steps to organize source code have typically been:
- Create one or more source folders.
- In a source folder, create package folders to mirror the package name.
- Place the .java files in the right package folders:

Many Java developers use the directory structure src/main/java for the source directory. So, for example, a class Main.java in the package com.acme.app would have the overall path src/main/java/com/acme/app/Main.java:

This is how source code in Java has typically been organized by developers for many years now. With Java 9 modules, there's a change in the way we approach structuring and writing code. Let's switch gears and examine what a module in Java 9 looks like.
- C++程序設(shè)計(第3版)
- Learning Apex Programming
- 編寫高質(zhì)量代碼:改善C程序代碼的125個建議
- INSTANT Django 1.5 Application Development Starter
- Rust Essentials(Second Edition)
- Android底層接口與驅(qū)動開發(fā)技術(shù)詳解
- Visual C#通用范例開發(fā)金典
- WordPress 4.0 Site Blueprints(Second Edition)
- Multithreading in C# 5.0 Cookbook
- jQuery炫酷應用實例集錦
- Unity 2018 Shaders and Effects Cookbook
- D3.js By Example
- Java程序員面試筆試寶典(第2版)
- Orchestrating Docker
- App Inventor少兒趣味編程動手做