![]() Related Questions Latest Answer : An abstract class can always have a constructor for a reason that an abstract class even though cannot be instantiated but it can be extended. Once its extended by its subclass. the object of the subclass can be instantiated. Incase of constructors its ... Read Answers (5) | Asked by : subbu What is the use of abstract classes? How will we decide in a scenario, whether we have to use abstract class or interface? Read Answers (21) | Asked by : Rajiv Tags : Abstract Can I restrict the users of my class(say class A) to create an instance of my class not more than once(only one), and if anybody tries to create more than one instance, all the object refernces should refer to the same (one) instance Read Answers (7) | Asked by : waseem Latest Answer : The class whose all methods have body is called as conceetclass Yes object class is concreet class ... Read Answers (6) | Asked by : vishal Class Outer{int a;Outer (){a=10;}public static void main(String args[]){final Outer o1=new Outer();Outer o2=new Outer();class inner{inner(){o1.a=20;//allowed//o2.a=30; not allowed}}}}Why inner classes can access only final variables as illustrated? Thanks in advance! Most frequently used diagrams are- Class Diagram- Sequence DiagramRarely Used- Component Diagram- Package DiagramClass Diagram A diagram that shows a collection of declarative (static) model elements, Latest Answer : Class Diagram : They describe the static structure of a system.Package Diagram : Package diagrams organize elements of a system into related groups to minimize dependencies between packages.Object Diagram : ... Latest Answer : A class which is define inside a class is known as inner class inner class can be static but top level class can not be static. ... Read Answers (1) | Asked by : Kanchan If I write all of concrete methods in one class and all abstract methods in an interface and extend and implement both in third class assume that third class don't extend any other class? Latest Answer : Abstract is most useful when you are creating a framework..take the example of template method pattern which is used in the templates provided by spring framework for the support of jdbc or hibernate it absrtacts out all the common things which needs ... Read Answers (4) | Asked by : Chandrashekhar Tags : Abstract What are advantages of inner class Latest Answer : Defining a class within another class is known as nested class.If class B is defined within class A, then B is known to A, but not outside of A.Class B has access to the members, including private members of the Class A.However,the class A does ...
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||