![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() 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 (20) | 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 : Logical grouping of classes—If a class is useful to only one other class, then it is logical to embed it in that class and keep the two together. Nesting such "helper classes" makes their package more streamlined. Increased encapsulation—Consider ... we are saying that private variables cant be access by other class or by other object of same class . so we are saying this as encapsulation or data hiding. we are saying this as a powerful oops concept.
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||