使用Maven添加依赖项时(Add Dependency)时,没有提示项目可用,并且在Console中,输出: Unable to update index for central|http://repo1.maven.org/maven2 . 解决方式如下: 1.通过其它方式下载如下两个文件: http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.properties http://repo1.maven.org/m
例如 package com.atguigu.java.fanshe; public class Person { String name; private int age; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) {
problom : 'f1' value hava been changed when output. reason : the binary repersentation of 2.2f is : 00110011001100110011... (is an infinite recurring decimal) but computer only store 24 byte , so discard the remaining number , lead to the value has b