This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Service { | |
void insert(); | |
} | |
public class RealService implements Service{ | |
@Override | |
public void insert() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vinimo; | |
public class OuterClassExample1 { | |
private String name = "John"; | |
static int x = 1; | |
class InnerClass { | |
void access() { | |
System.out.println("name = " + name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vinimo; | |
public class OuterClass { | |
public int age = 30; | |
class InnerClass { | |
public int age = 20; | |
void methodInInnerClass(int age) { | |
System.out.println("age = " + age); | |
System.out.println("this.age = " + this.age); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vinimo; | |
public class App { | |
public static void main(String[] args) { | |
String str = "Java is not dead"; | |
modify(str); | |
System.out.println(str); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vinimo; | |
public class App { | |
public static void main(String[] args) { | |
Foo foo = new Foo(1); | |
modify(foo); | |
System.out.println(foo.x); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vinimo; | |
public class App { | |
public static void main(String[] args) { | |
Foo foo = new Foo(1); | |
modify(foo); | |
System.out.println(foo.x); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vinimo; | |
public class App { | |
public static void main(String[] args) { | |
int foo = 1; | |
modify(foo); | |
System.out.println(foo); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Your like depends on this condition | |
if True: | |
print("OK") | |
print("Bye") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (true) { | |
System.out.println("OK") | |
System.out.println("Bye") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if True: | |
print("OK") | |
print("Bye") |
NewerOlder