📄 testmethod.java
字号:
class Testmethod
{double x, y ;static float mark;
float total(float a,float b)
{
float total;
x=0.4;y=0.6;
total=(float)(x* a+ y* b);
return total;
}
static void setmark(float i)
{ mark=i;}
static float getmark( )
{return mark ;}
public void display()
{System.out.println("The total score" + "=" + mark);
}
public static void main(String[] args)
{
Testmethod tm = new Testmethod ();
mark=tm.total(67,98);
tm.display();
tm.setmark(96);
tm.display();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -