package top.qaqaq.java.P696;
import top.qaqaq.java.P696.bean.Person;
/**
* @author RichieZhang
* @create 2022-11-05 上午 10:56
*/
public class ModuleTest {
public static void main(String[] args) {
Person p = new Person("Tom", 12);
System.out.println(p);
}
}
/**
* @author RichieZhang
* @create 2022-11-05 上午 10:58
*/
module Code {
requires Java9Test;
requires org.junit.jupiter.api;
requires java.sql;
requires commons.io;
requires java.net.http;
}
package top.qaqaq.java.P696.bean;
/**
* @author RichieZhang
* @create 2022-11-05 上午 10:57
*/
public class Person {
private String name;
private int age;
public Person() {
}
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return "Person{" +
"name='" + name + '\'' +
", age=" + age +
'}';
}
}
/**
* @author RichieZhang
* @create 2022-11-05 上午 10:59
*/module Java9Test {
exports top.qaqaq.java.P696.bean;
}