0
What operand i Can Do for my two object variable ? I have error in my code. Thanks you.
2 Respuestas
+ 1
public class Program
{
public static void main(String[] args) {
Int myint1 = new Int (5) ;
Int myint2 = new Int (5);
System.out.println (myint1.number + myint2.number);
}
}
class Int {
int number;
Int (int mynumber){
this.number = mynumber ;
}
}
0
Put "Public"int number in your class INT.