Welcome Guest | Sign in | Register
Core - Java Programming Interview Questions and Answers | LucentBlackBoard | LucentBlackBoard.com
71. What is the return type of a program's main() method?

void

72. If a variable is declared as private, where may the variable be accessed?

A private variable may only be accessed within the class in which it is declared.

73. What do you understand by private, protected and public?

These are accessibility modifiers. Private is the most restrictive, while public is the least restrictive. There is no real difference between protected and the default type (also known as package protected) within the context of the same package, however the protected keyword allows visibility to a derived class in a different package.

74. What is Downcasting ?

Downcasting is the casting from a general to a more specific type, i.e. casting down the hierarchy

75. What modifiers may be used with an inner class that is a member of an outer class?

A (non-local) inner class may be declared as public, protected, private, static, final, or abstract.




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.