@nabbit123/

project#14

Java

No description

fork
loading
Files
  • Main.java
  • Main.class
  • Student.class
  • Student.java
  • StudentAthlete.class
  • StudentAthlete.java

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.49740843256985534","path":"Main.java","file":{"path":"Main.java","content":{"asEncoding":{"base64":"cHVibGljIGNsYXNzIE1haW4KewogICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgIC8vICBDcmVhdGVzIG9iamVjdHMgb2YgdHdvIHN0dWRlbnQgdHlwZXMsIHByaW50cyBzb21lIGluZm9ybWF0aW9uCiAgIC8vICBhYm91dCB0aGVtLCB0aGVuIGNoZWNrcyB0aGVtIGZvciBlcXVhbGl0eS4KICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQogICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykKICAgewogICAgICBTdHVkZW50IEZyYW5rID0gbmV3IFN0dWRlbnQgKCJGcmFuayIsIDUpOwogICAgICBTdHVkZW50QXRobGV0ZSBTdWtpID0gbmV3IFN0dWRlbnRBdGhsZXRlICgiU3VraSIsIDQsICJTb2NjZXIiKTsKICAgICAgU3R1ZGVudCBHaW92YW5uaSA9IG5ldyBTdHVkZW50QXRobGV0ZSAoIkdpb3Zhbm5pIiwgOSwgIkJhc2ViYWxsIik7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoRnJhbmspOwogICAgICBTeXN0ZW0ub3V0LnByaW50bG4gKCk7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoU3VraSk7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoKTsKICAgICAgU3lzdGVtLm91dC5wcmludGxuIChHaW92YW5uaSk7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoKTsKICAgICAgaWYgKCEgRnJhbmsuZXF1YWxzKFN1a2kpKQogICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4gKCJUaGVzZSBhcmUgdHdvIGRpZmZlcmVudCBzdHVkZW50cy4iKTsKICAgfQp9"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public class Main
{
   //-----------------------------------------------------------------
   //  Creates objects of two student types, prints some information
   //  about them, then checks them for equality.
   //-----------------------------------------------------------------
   public static void main (String[] args)
   {
      Student Frank = new Student ("Frank", 5);
      StudentAthlete Suki = new StudentAthlete ("Suki", 4, "Soccer");
      Student Giovanni = new StudentAthlete ("Giovanni", 9, "Baseball");
      System.out.println (Frank);
      System.out.println ();
      System.out.println (Suki);
      System.out.println ();
      System.out.println (Giovanni);
      System.out.println ();
      if (! Frank.equals(Suki))
         System.out.println ("These are two different students.");
   }
}