java: Apache NetBeans IDE 19

 添加.jar文件

/**
 * encoding: utf-8
 * 版权所有 2023 涂聚文有限公司
 * 许可信息查看:
 * 描述:
 * # Author    : geovindu,Geovin Du 涂聚文.
 * # IDE       : Apache NetBeans IDE 19 windows 10 Java 17
 * # Datetime  : 2023 - 2023/11/16 - 12:29
 * # User      : geovindu
 * # Product   : Apache NetBeans
 * # Project   : javademo
 * # File      : User.java  类
 * # explain   : 学习
 **/
package Model;

import java.util.Objects;
/**
 *用户
 * @author geovindu
 */
public class User {
      /**
     *姓名
     */
    private String name;
    /**
     *职业
     */
    private String occupation;
    /**
     *兄弟姐妹有几人
     */
    private int siblings;
    /**
     *身高
     */
    private double height;
    /**
     *结婚否
     */
    private boolean married;

    /**
     *
     * @param name
     * @param occupation
     * @param siblings
     * @param height
     * @param married
     */
    public User(String name, String occupation, int siblings,
                double height, boolean married) {

        this.name = name;
        this.occupation = occupation;
        this.siblings = siblings;
        this.height = height;
        this.married = married;
    }

    /**
     *获取姓名
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     *设置姓名
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     *
     * @return
     */
    public String getOccupation() {
        return occupation;
    }

    /**
     *
     * @param occupation
     */
    public void setOccupation(String occupation) {
        this.occupation = occupation;
    }

    /**
     *
     * @return
     */
    public int getSiblings() {
        return siblings;
    }

    /**
     *
     * @param siblings
     */
    public void setSiblings(int siblings) {
        this.siblings = siblings;
    }

    /**
     *
     * @return
     */
    public double getHeight() {
        return height;
    }

    /**
     *
     * @param height
     */
    public void setHeight(double height) {
        this.height = height;
    }

    /**
     *
     * @return
     */
    public boolean isMarried() {
        return married;
    }

    /**
     *
     * @param married
     */
    public void setMarried(boolean married) {
        this.married = married;
    }

    /**
     *
     * @param o
     * @return
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return siblings == user.siblings && Double.compare(user.height, height) == 0
                && married == user.married && Objects.equals(name, user.name)
                && Objects.equals(occupation, user.occupation);
    }

    /**
     *
     * @return
     */
    @Override
    public int hashCode() {
        return Objects.hash(name, occupation, siblings, height, married);
    }

    /**
     *
     * @return
     */
    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("User{");
        sb.append("name='").append(name).append('\'');
        sb.append(", occupation='").append(occupation).append('\'');
        sb.append(", siblings=").append(siblings);
        sb.append(", height=").append(height);
        sb.append(", married=").append(married);
        sb.append('}');
        return sb.toString();
    }
}

  

 

 

 

 

project.xml:

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.java.j2seproject</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
            <name>JavaDemo</name>
            <source-roots>
                <root id="src.dir"/>
            </source-roots>
            <test-roots>
                <root id="test.src.dir"/>
            </test-roots>
        </data>
        <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
            <definitions>           
    <!-- https://mvnrepository.com/artifact/jfree/jfreechart -->
<dependency>
    <groupId>jfree</groupId>
    <artifactId>jfreechart</artifactId>
    <version>1.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/jfree/jfreechart -->
<dependency>
    <groupId>jfree</groupId>
    <artifactId>jfreechart</artifactId>
    <version>1.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/jfree/jcommon -->
<dependency>
    <groupId>jfree</groupId>
    <artifactId>jcommon</artifactId>
    <version>1.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.darwinsys/darwinsys-api -->
<dependency>
    <groupId>com.darwinsys</groupId>
    <artifactId>darwinsys-api</artifactId>
    <version>1.7.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.16.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-annotations</artifactId>
    <version>2.16.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
    <groupId>org.json</groupId>
    <artifactId>json</artifactId>
    <version>20231013</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-csv -->
<dependency>
    <groupId>com.fasterxml.jackson.dataformat</groupId>
    <artifactId>jackson-dataformat-csv</artifactId>
    <version>2.16.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.16.0</version>
</dependency>
</definitions>

        </libraries>
        
    </configuration>
</project>

  

 

 

 

/**
 * encoding: utf-8
 * 版权所有 2023 涂聚文有限公司
 * 许可信息查看:
 * 
 * 描述:  stringtree.org
 * json.org
 * jackson.org
 * javax.json   j2ee
 * # Author    : geovindu,Geovin Du 涂聚文.
 * # IDE       : Apache NetBeans IDE 19 windows 10 Java 17
 * # Datetime  : 2023 - 2023/11/16 - 12:07
 * # User      : geovindu
 * # Product   : IntelliJ IDEA
 * # Project   : javademo
 * # File      : main.java  类
 * # explain   : 学习
 * 
 */

import com.darwinsys.util.*;
import Common.Env;
import Common.JsonHelper;
import BLL.UserBll;

/**
 *
 * @author geovindu
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        System.out.println("Hello java language world! 涂聚文!");
        UserBll bll=new UserBll();
        UserBll.getUser();
        UserBll.getUserArry();
        UserBll.getWrite();
        UserBll.getCsvtoJson();

        System.out.println(Env.getEnv());
        System.out.println(Env.getColor());
        Env.getEnvList();
           
           
    }
    
}

  

posted @ 2023-11-17 09:28  ®Geovin Du Dream Park™  阅读(29)  评论(0编辑  收藏  举报