根据老师代码敲出的结果为什么不是1
> class ProjectVersion{
> private int major;
> private int minor;
>
> ProjectVersion(int major, int minor) {
> this.major = major;
> this.minor = minor;
> }
>
> int getMajor() {
> major
> }
>
> void setMajor(int major) {
> this.major = major;
> }
>
> int getMinor() {
> minor
> }
>
> void setMinor(int minor) {
> this.minor = minor
> }
> }
>
> ProjectVersion v1=new ProjectVersion(1,1);
>
> print v1.minor;
101bd8da7-84b0-4f52-9f98-fd15f4dbc1a7
> class ProjectVersion{
> private int major;
> private int minor;
>
> ProjectVersion(int major, int minor) {
> this.major = major;
> this.minor = minor;
> }
>
> int getMajor() {
> major
> }
>
> void setMajor(int major) {
> this.major = major;
> }
>
> int getMinor() {
> minor
> }
>
> void setMinor(int minor) {
> this.minor = minor
> }
> }
>
> ProjectVersion v1=new ProjectVersion(1,1);
>
> print v1.minor;
101bd8da7-84b0-4f52-9f98-fd15f4dbc1a7