Question #86 "Can a constructor be declared private?"
The game says that the answer is No, but:
public class StrTest
{
public StrTest()
{
//super();
}
private StrTest(
String one){ }
public static void main(String[] args)
{
StrTest rv1= new StrTest();
}
}
compiles with no warnings and runs.
(and it is even cocky enough to tell me: "So how do you make an object...?[..]". )
:-) Is it wrong or me?
[ May 19, 2008: Message edited by: Kosta Servis ]