Newbie Java Doubts
Ok,so finally I have started learning java..and I have some newbie doubts which can annoy the answerer(they can be a lil dumb)..Please help me out CEans!😀
1.Can we not define main function outside the class?
2.Can a class having main function have other members too?
3.Can main function be defined in a class whose object is created within main?
4.What actually object holds,is it a pointer(I know the concept of object,just asking about its memory representation?
5.Why do we need to define get and set functions,why don't we simply make the variables public?