I was asked this question in my examination
static long afield = 123;
afield = 1000;
static void Main(String args)
main obj = new main();
Omitting the access modifier (
protected) on any member (constructor, field, property, method, event, etc.) will leave the member private by default.
However if you don't define any constructors yourself, the class will implicitly get a parameterless public constructor. If this weren't so, you would have to write an empty public constructor for every class you create.