{
{
println("\ntest1");
Foo
foo1 = Foo.fromNameId("Kofi", 101),
foo2 = Foo.fromNameId("Asha", 102);
println("foo1: " + foo1);
println("foo2: " + foo2);
println("equals: " + foo1.equals(foo2));
}
{
println("\ntest2");
Foo
foo1 = Foo.fromNameId("Kofi", 101),
foo2 = Foo.fromNameId("Kofi", 101);
println("foo1: " + foo1);
println("foo2: " + foo2);
println("equals: " + foo1.equals(foo2));
}
{
println("\ntest3");
Foo
foo1 = Foo.fromNameId("Kofi", 101),
foo2;
foo2 = new Foo(foo1);
println("foo1: " + foo1);
println("foo2 (copy of foo1): " + foo2);
println("equals: " + foo1.equals(foo2));
}
{
FooTests tests = new FooTests();
tests.test1();
tests.test2();
tests.test3();
}
{
System.out.println(o != null ? o.toString() : "null");
}
}