class Demo
{
int sum,a,b;
public int getsum()
{
sum = a + b;
System.out.println(sum);
return sum;
}
public boolean compare()
{
if(a==b)
System.out.println(a==b);
else
System.out.println(false);
return a==b;
}
}
class Array
{
//int[] arr = new arr[9];
public void array()
{
for (int a=1;a<=9;a++)
{
for (int b=1;b<=a;b++)
{
System.out.print(a+"*"+b+"="+(a*b)+"\t");
}
System.out.println();
}
}
}
class Demotext
{
public static void main(String[] args)
{
Demo d = new Demo();
Array a = new Array();
d.getsum();
d.compare();
a.array();
}
}
|
|