@nabbit123/

project#11b

Java

No description

fork
loading
Files
  • Main.java
  • Main.class
  • Main$Num.class

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6369895002059343","path":"Main.java","file":{"path":"Main.java","content":{"asEncoding":{"base64":"cHVibGljIGNsYXNzIE1haW57CiAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKXsKICAgICAgTnVtIG4xID0gbmV3IE51bSAoNTYpOwogICAgICBOdW0gbjIgPSBuZXcgTnVtICg1Nyk7CiAgICAgIEludGVnZXIgaTEgPSBuZXcgSW50ZWdlciAoMjMpOwogICAgICBJbnRlZ2VyIGkyID0gbmV3IEludGVnZXIgKDI0KTsKICAgICAgU3lzdGVtLm91dC5wcmludGxuICgibjE6ICIgKyBuMSk7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoIm4yOiAiICsgbjIpOwogICAgICBTeXN0ZW0ub3V0LnByaW50bG4gKCJpMTogIiArIGkxKTsKICAgICAgU3lzdGVtLm91dC5wcmludGxuICgiaTI6ICIgKyBpMik7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoKTsKICAgICAgbjEgPSBuMjsKICAgICAgaTEgPSBpMjsKICAgICAgU3lzdGVtLm91dC5wcmludGxuICgibjE6ICIgKyBuMSk7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoIm4yOiAiICsgbjIpOwogICAgICBTeXN0ZW0ub3V0LnByaW50bG4gKCJpMTogIiArIGkxKTsKICAgICAgU3lzdGVtLm91dC5wcmludGxuICgiaTI6ICIgKyBpMik7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoKTsKICAgICAgbjEuc2V0VmFsdWUobjEuZ2V0VmFsdWUoKSsxKTsKICAgICAgaTErKzsKICAgICAgU3lzdGVtLm91dC5wcmludGxuICgibjE6ICIgKyBuMSk7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoIm4yOiAiICsgbjIpOwogICAgICBTeXN0ZW0ub3V0LnByaW50bG4gKCJpMTogIiArIGkxKTsKICAgICAgU3lzdGVtLm91dC5wcmludGxuICgiaTI6ICIgKyBpMik7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoKTsKICAgfQogICBwdWJsaWMgc3RhdGljIGNsYXNzIE51bXsKICAgcHJpdmF0ZSBpbnQgdmFsdWU7CgogICBwdWJsaWMgTnVtIChpbnQgdXBkYXRlKXsKICAgICAgdmFsdWUgPSB1cGRhdGU7CiAgIH0KICAgcHVibGljIGludCBnZXRWYWx1ZSAoKXsKICAgICAgcmV0dXJuIHZhbHVlOwogICB9CiAgIHB1YmxpYyB2b2lkIHNldFZhbHVlIChpbnQgdXBkYXRlKXsKICAgICAgdmFsdWUgPSB1cGRhdGU7CiAgIH0KICAgcHVibGljIFN0cmluZyB0b1N0cmluZyAoKXsKICAgICAgcmV0dXJuIHZhbHVlICsgIiI7CiAgIH0KIH0KfQo="},"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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
public class Main{
   public static void main (String[] args){
      Num n1 = new Num (56);
      Num n2 = new Num (57);
      Integer i1 = new Integer (23);
      Integer i2 = new Integer (24);
      System.out.println ("n1: " + n1);
      System.out.println ("n2: " + n2);
      System.out.println ("i1: " + i1);
      System.out.println ("i2: " + i2);
      System.out.println ();
      n1 = n2;
      i1 = i2;
      System.out.println ("n1: " + n1);
      System.out.println ("n2: " + n2);
      System.out.println ("i1: " + i1);
      System.out.println ("i2: " + i2);
      System.out.println ();
      n1.setValue(n1.getValue()+1);
      i1++;
      System.out.println ("n1: " + n1);
      System.out.println ("n2: " + n2);
      System.out.println ("i1: " + i1);
      System.out.println ("i2: " + i2);
      System.out.println ();
   }
   public static class Num{
   private int value;

   public Num (int update){
      value = update;
   }
   public int getValue (){
      return value;
   }
   public void setValue (int update){
      value = update;
   }
   public String toString (){
      return value + "";
   }
 }
}