GeekInterview.com
   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

GeekInterview.com  >  Placement Papers  >  Manhattan Associates  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 11 of 17    Print  
How to prevent a class from being the Base Class ?

(a) declare it as final
(b) declare it as static


  
Total Answers and Comments: 2 Last Update: August 06, 2005   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 17, 2005 08:11:28   #1  
Lavanya        

RE: How to prevent a class from being the Base Class ?(a) declare it as final (b) declare it as static
a
 
Is this answer useful? Yes | No
August 06, 2005 04:28:39   #2  
Kranthi Reddy        

RE: How to prevent a class from being the Base Class ?(a) declare it as final (b) declare it as static
yes answer is final 
it wou't give chance to other to modify. 
it prevant to other to chace the class.

 
Is this answer useful? Yes | No

 Related Questions

Which of the following 2 methods executes faster ?class Trial { String _member; void method1() { for(int i=0;i<2048;i++) { _member += "test"; } } void method2() { String temp; for(int i=0;i<2048;i++) { temp += "test"; } _member = temp; } } (a) method1() (b) method2() (c) Both method1() and method2() takes same time for execution
(b)Accessing method variables requires less overhead than accessing class variables. 

By default, Strings to functions are passed using the method(a) Call by Value (b) Call by Reference (c) Strings cannot be passed to function
(b)String is a class defined in java.lang and in java all classes are passed by reference. 

What is the output of following program ?class Test { public static void main(String args[]) { for(int i=0;i<2;i++) { System.out.println(i); } } }(a) Goes into infinite loop (b) 0,1 (c) 0,1,2 (d) None
(a) 

Latest Answer : protected void finalize() method is called by the garbage collector just before it is about to reclaim the memory space acquired by the object. ...

Latest Answer : Static Methods over loading is of no use for example the below code will produce a output of B.m1 C.m1 C.m1 if we remove static in those functions we will get an ouput of  B.m1 C.m1 B.m1 class C{   static ...

Latest Answer : yes answer is final  it wou't give chance to other to modify. it prevant to other to chace the class. ...

What is the better way of writing the Constructor with 2 parameters in the following code:class Test { int x,y; Test(int a) { //Code for very complex operations will be written //in this place x=a; } Test(int a, int b) { //Code for very complex operations will be written //in this place (same code as in above constructor) x=a; y=b; } }


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

C++ Static Functions

C Static Functions Static member functions have a class scope and they do not have access to the this pointer of the class When a member is declared as static a static member of class it has only one data for the entire class even though there are many objects created for the class The main usage of
 

C++ Pure Virtual Function and Base Class

C Pure Virtual Function and Virtual Base Class In this C tutorial you will learn about pure virtual function declaration of pure virtual function and virtual base class virtual base class and how to implement a virtual base class explained with examples mosgoogle center What is Pure Virtual Function
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

How to Access C++ Class Members

How to Access C Class Members In this C tutorial you will learn how to access Class members dot operator or class member access operator difference between struct and class and&nbsp; scope resolution operator mosgoogle center It is possible to access the class members after a class is defined an
 

Base Address of the String

What happens when we try to change the value of base address of the string? The base address of the sting takes a special place in the context of strings. This is because suing this base address only the string gets identified. In other words the base address therefore takes the position of constant
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

UML Elements : Class Diagram

UML Elements UML 2 0 is comprised of a total of 13 diagrams If you wish to understand these diagrams they should be organized based on a hierarchy For UML a diagram is an element which must define which things should be modeled in a system mosgoogle center Introduction to Class Diagram In this arti
 

Java Technology Trends

Technology Trends Involving Java Java is an object oriented programming language OOP for Web browsers It is organized around data rather than actions and supports polymorphism which allows the same code to be written generically so it can function with different datatypes inheritance which allows on
 

Static Functions - An Introduction

Static Functions An Introduction The static member functions have a class scope and they do not have access to the this pointer of the class When a member is declared as static that is a static member of class have only one such data for the entire class even though there are many objects created fo
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape