qweewq22
چهارشنبه 07 اردیبهشت 1390, 15:28 عصر
سلام خدمت اساتید گرامی
می خواستم بدونم خطی که با ** مشخص کردم چه فرقی با خط *** داره ؟!
class a{
int i,j;
void showij(){
System.out.println(i+" "+j);
}
}
class b extends a{
int k;
void showk(){
System.out.println(k);
}
void sum(int a1,int b1,int c1){
int m=a1+b1*c1;
*** System.out.println("sum isNot "+i+j+k);
System.out.println("sum is "+(i+j+k));
System.out.println(a1+""+b1+""+""+c1);
** System.out.println(a1+b1+c1);
System.out.println(m);
}
}
public class Main {
public static void main(String[] args) {
a obja=new a();
obja.i=10;
obja.j=20;
obja.showij();
b objb=new b();
objb.k=30;
objb.showk();
objb.i=10;
objb.j=15;
objb.k=20;
objb.showk();
objb.sum(objb.i,objb.j,objb.k);
}
}
می خواستم بدونم خطی که با ** مشخص کردم چه فرقی با خط *** داره ؟!
class a{
int i,j;
void showij(){
System.out.println(i+" "+j);
}
}
class b extends a{
int k;
void showk(){
System.out.println(k);
}
void sum(int a1,int b1,int c1){
int m=a1+b1*c1;
*** System.out.println("sum isNot "+i+j+k);
System.out.println("sum is "+(i+j+k));
System.out.println(a1+""+b1+""+""+c1);
** System.out.println(a1+b1+c1);
System.out.println(m);
}
}
public class Main {
public static void main(String[] args) {
a obja=new a();
obja.i=10;
obja.j=20;
obja.showij();
b objb=new b();
objb.k=30;
objb.showk();
objb.i=10;
objb.j=15;
objb.k=20;
objb.showk();
objb.sum(objb.i,objb.j,objb.k);
}
}