📄 academia.java
字号:
//********************************************************************
// Academia.java Author: Lewis/Loftus
//
// Demonstrates the use of methods inherited from the Object class.
//********************************************************************
public class Academia
{
//-----------------------------------------------------------------
// Creates objects of two student types, prints some information
// about them, then checks them for equality.
//-----------------------------------------------------------------
public static void main (String[] args)
{
Student susan = new Student ("Susan", 5);
GradStudent frank = new GradStudent ("Frank", 3, "GTA", 12.75);
System.out.println (susan);
System.out.println ();
System.out.println (frank);
System.out.println ();
if (! susan.equals(frank))
System.out.println ("These are two different students.");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -