public class text
{
int i=8,j=9;
char p='*';
text()
{
jisuan(p);
}
void jisuan(char ch)
{
switch(ch)
{
case '+':
System.out.println("结果"+(i+j));
break;
case '-':
System.out.println("结果"+(i-j));
break;
case '*':
System.out.println("结果"+(i*j));
break;
case '/':
System.out.println("结果"+(i/j));
break;
}
}
public static void main(String[] args)
{
text text1=new text();
}
}
{
int i=8,j=9;
char p='*';
text()
{
jisuan(p);
}
void jisuan(char ch)
{
switch(ch)
{
case '+':
System.out.println("结果"+(i+j));
break;
case '-':
System.out.println("结果"+(i-j));
break;
case '*':
System.out.println("结果"+(i*j));
break;
case '/':
System.out.println("结果"+(i/j));
break;
}
}
public static void main(String[] args)
{
text text1=new text();
}
}
