首页 > 编程语言 >java: Apache NetBeans IDE 19

java: Apache NetBeans IDE 19

时间:2023-11-17 09:46:42浏览次数:40  
标签:return name 19 married Apache siblings IDE public occupation

 添加.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>
</definitions>

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

  

 

 

标签:return,name,19,married,Apache,siblings,IDE,public,occupation
From: https://www.cnblogs.com/geovindu/p/17837894.html

相关文章

  • 非常经典的一道SQL报错注入题目[极客大挑战 2019]HardSQL 1(两种解法!)
    题目环境:<br/>没错,又是我,这群该死的黑客竟然如此厉害,所以我回去爆肝SQL注入,这次,再也没有人能拿到我的flag了做了好多这个作者出的题了,看来又要上强度了判断注入类型username:adminpassword:1这里把参数password作为注入点<br/>1'<br/>单引号的字符型注入万能密码注......
  • IDEA插件推荐:Apipost-Helper
    IDEA是一款功能强大的集成开发环境(IDE),它可以帮助开发人员更加高效地编写、调试和部署软件应用程序。我们在编写完接口代码后需要进行接口调试等操作,一般需要打开额外的调试工具。今天给大家介绍一款IDEA插件:Apipost-Helper-2.0。代码写完直接编辑器内调试、还支持生成接口文档、接......
  • Apipost 推出IDEA插件一键生成API文档
    今天给大家推荐一款IDEA插件:Apipost-Helper-2.0,写完代码IDEA内一键生成API文档,无需安装、打开任何其他软件;写完代码IDEA内一键调试,无需安装、打开任何其他软件;生成API目录树,双击即可快速定位API定义的代码…非常好用!而且完全免费!在IDEA编辑器插件中心输入Apipost搜索安装:Apipost-......
  • Apipost 推出IDEA插件一键生成API文档
    今天给大家推荐一款IDEA插件:Apipost-Helper-2.0,写完代码IDEA内一键生成API文档,无需安装、打开任何其他软件;写完代码IDEA内一键调试,无需安装、打开任何其他软件;生成API目录树,双击即可快速定位API定义的代码…非常好用!而且完全免费!在IDEA编辑器插件中心输入Apipost搜索安装:Apipost......
  • IDEA插件推荐:Apipost-Helper
    IDEA是一款功能强大的集成开发环境(IDE),它可以帮助开发人员更加高效地编写、调试和部署软件应用程序。我们在编写完接口代码后需要进行接口调试等操作,一般需要打开额外的调试工具。今天给大家介绍一款IDEA插件:Apipost-Helper-2.0。代码写完直接编辑器内调试、还支持生成接口文档、......
  • Idea配置mybatis核心配置文件模板
    在我们日常开发中不可能将mybatis相关配置文件全部记住,我们这里通过在idea中配置模板快捷生成(本文演示idea版本为2022.02.01)。方法如下:1.进入idea设置File->settings2.选择Editor->FileandCodeTemplates->Files3.点击“+”创建模板,对模板命名,设置模板类型,设置模板默认名字(模板中......
  • 库存管理领域的 RFID(Radio-Frequency Identification)设备介绍
    库存管理领域的RFID(Radio-FrequencyIdentification)设备是一种重要的技术工具,用于跟踪和管理库存、资产和物流的过程。RFID技术采用了射频识别技术,通过无线通信来捕捉、存储和检索数据。这种技术在医疗设备经销商、制造商和医院等医疗领域的库存管理中发挥了关键作用。RFID技术的......
  • Index was outside the bounds of the array ,LocalReport.Render
     Finallyicanexporttoexcel,..ifoundthatreportingserviceshasalimitation..youcan´tinsertatableinanothertableormatrix..onlyListcanbenested..itrytosay..ifyouneedtoshowdatanestedlikemasterdetail,youmustuseonlylist......
  • PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderExce
    由于接口是HTTPS,本地没有证书,导致报PKIXpathbuildingfailed:sun.security.provider.certpath.SunCertPathBuilderException:unabletofindvalidcertificationpathtorequestedtarget导出证书Chrome浏览器导出HTTPS证书创建一个Java信任库创建一个Java信任库(Trusts......
  • [ZJCTF 2019]NiZhuanSiWei
    <?php$text=$_GET["text"];$file=$_GET["file"];$password=$_GET["password"];if(isset($text)&&(file_get_contents($text,'r')==="welcometothezjctf")){echo"<br><h1&g......