What is wrong with the following program?
class Main { String s = "abc"; public static void main(String[] args) { System.out.println(s); } }
main()
cannot be declared public because Main is not public. main()
is static, it may not access non-static s without a reference to an instance of Main. main()
argument list is incorrect. C.
The non-static s variable may only be accessed with a reference to a Main object.