15 lines
408 B
Java
Executable File
15 lines
408 B
Java
Executable File
public class StoreSomethingParMainTrick
|
|
{
|
|
public static void main(String[] args)
|
|
{
|
|
StoreSomethingParCon a = new StoreSomethingParCon("I'm a String");
|
|
System.out.println(a.get());
|
|
a.set("new String");
|
|
System.out.println(a.get());
|
|
StoreSomethingPar b = new StoreSomethingPar();
|
|
b.set("I'm var b");
|
|
System.out.println(b.get());
|
|
b.set("new b");
|
|
System.out.println(b.get());
|
|
}
|
|
} |