Skip to content

Commit

Permalink
4.2. 클래스의 형식
Browse files Browse the repository at this point in the history
  • Loading branch information
egoing committed Sep 21, 2019
1 parent fc220dd commit 13012a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
15 changes: 1 addition & 14 deletions MyOOP.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
class Print{
public static String delimiter = "";
public static void A() {
System.out.println(delimiter);
System.out.println("A");
System.out.println("A");
}
public static void B() {
System.out.println(delimiter);
System.out.println("B");
System.out.println("B");
}
}
public class MyOOP {
public static void main(String[] args) {
Print.delimiter = "----";
Print.A();
Print.A();
Print.B();
Print.B();

Print.delimiter = "****";
Print.A();
Print.A();
Expand Down
16 changes: 16 additions & 0 deletions Print.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

class Print {
public static String delimiter = "";

public static void A() {
System.out.println(delimiter);
System.out.println("A");
System.out.println("A");
}

public static void B() {
System.out.println(delimiter);
System.out.println("B");
System.out.println("B");
}
}

0 comments on commit 13012a3

Please sign in to comment.