class DemoTest
{
public static void main(String[] args)
{
System.out.println(Demo.add(4,5));
System.out.println(Demo.same(4,5));
Demo.chengfa();
}
}
class Demo{
public static int add( int a,int b){
return a+b;
}
public static boolean same ( int a,int b){
if (a==b)
{
return true;
}
return false;
}
public static void chengfa(){
for (int i = 1;i <= 9;i++ )
{
for (int j = 1;j <=i;j++ )
{
System.out.print(i+"*"+j+"="+i*j+'\t');
}
System.out.println();
}
}
}
|
|