Hi Guys,
I came across following questions in JSecure mock exam which I had doubts about. Thanks in advance for your time.
____________________________________________
Top level class can be
1.publc
2.friendly
3.protected
4.private
5.abstract
Answers given were 1,5. I am not sure about Abstract answer?
Can somebody explain this.
____________________________________________________________
What is access modifier for no-arg constructor?
Answer given is coderanch, I thought it would be default access which is package? Any thoughts?
_____________________________________________________________
Non-static inner class access private instance variables in
enclosing class. True/False.
Ans given is false, my answer was true.
I have coded this and private instance variables can be accessed by non-static inner class, any thoughts?
______________________________________________________________
Java doesn't care about order of appearence of modifiers. T/F
My answer False based on my understanding that certain modifiers
like abstract has to be first modifier for class definition.
Can someone explain this?
Their answer was true.
_______________________________________________________________