主题:新手求回答
public int num(){
System.out.println("hello");
System.out.println("hi");
int aa=12;
return aa;
}
public void count(){
int bb=num();
int sum=bb+10;
System.out.println(sum);
}
public static void main(String[] args) {
dsaasd aa=new dsaasd();
aa.count();
}
我只想留下sum的值,不想输出hello,hi。。怎么实现?
System.out.println("hello");
System.out.println("hi");
int aa=12;
return aa;
}
public void count(){
int bb=num();
int sum=bb+10;
System.out.println(sum);
}
public static void main(String[] args) {
dsaasd aa=new dsaasd();
aa.count();
}
我只想留下sum的值,不想输出hello,hi。。怎么实现?