为什么没有赋值上呢?输出的是0和0.00
package com.dyd;
public class Project {
int num;
float cpu;
public static void main(String[] args) {
//给属性赋值
Project hello=new Project();
// hello.num=3;
// hello.cpu=2.9f;
hello.show();
// shows.num=2;
// shows.cpu=1.9f;
// shows.show();
}
public void show() {
Project hello=new Project();
hello.num=3;
hello.cpu=2.9f;
System.out.println("num:"+num+"cpu:"+cpu);
}
}