慕妹7264492
2018-06-29 21:52
> 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
结果是1,我就拷你代码执行了一次都是1
新一代构建工具gradle
39540 学习 · 98 问题
相似问题