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