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  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 448 of 493    Print  
What is the need for calling default constructor by JVM? why the JVM should intiializes default values to the data
fields if the constructor is not there in our class?

  
Total Answers and Comments: 2 Last Update: February 14, 2008     Asked by: M.S.R.PavanKumar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 20, 2007 06:51:37   #1  
Raghava        

RE: What is the need for calling default constructor b...

First, Let us understand the concept of construcotrs. The constructors are used to construct objects. This is the Only way to create object. If we did not write any constructor in our class, the compliler itself creates a dummy default constructor, which do not have parameters and code. When this dummy default constructor is executed the JVM initializes the instance variable by their default values.
 

Is this answer useful? Yes | No
February 14, 2008 01:14:43   #2  
sampra Member Since: February 2008   Contribution: 279    

RE: What is the need for calling default constructor by JVM? why the JVM should intiializes default values to the data fields if the constructor is not there in our class?
use of default constructor is to create the default object of type java.lang.Class which is done by JVM
 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : encapsulation mean data hiding.data correspond to varibles and methods of the class. Data hiding mean: when u make different objects of the same class. The data stored in one object is unaware of the data for other object of the same class. In, this way ...

Latest Answer : The intention behind this question is not clear here. Can u elaborate the question??????????? ...

Latest Answer : In Java Object are passed by reference and Primitive data is always pass by value ...

Latest Answer : yes they are represented as wrapper classes ...

Latest Answer : A static member class or a static member interface comprises the same declarations as those allowed in an ordinary top-level class or interface. A static member class must be declared as a static member of an enclosing class or interface. Nested ...

Latest Answer : we declare constant in java by final keyword and we have to intilize by our own JVM is not respnsble fr it ...

Can we declare multiple main() methods in multiple classes.ie can we have each main method in its class in our program?

Design Pattern means how u r approaching the problem.Architecture means how the data is flowing in your application 
Latest Answer : design pattern howarch what ...
Read Answers (4) | Asked by : Praveen

Latest Answer : if we declare const as pvt thn can use in other class ...
Read Answers (4) | Asked by : Beena

br />1.what is oracle.2.what is major differenece oracle8i and oracle9i.4.tell me some thing ur self.5.please tell me about oops.6.what is single inheritance.7.what is multiple inheritance.8.can java support 
Latest Answer : how do u prove that abstrace class cannot instantiate directly?    ofcourse abstract class can have constructor,but the keyword "abstract" denotes that the class or method is not yet constructed fully.So if we use abstract keyword ...
Read Answers (10) | Asked by : rajjava


 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
 

Breaking up XML into Relational Data

Breaking up XML into Relational Data While the preceding example shows how to construct an XML representation over relational data the example in this section illustrates how you can shred XML data back into relational data This reverse operation can be useful if your application works with relation
 

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Retrieving XML Data

Retrieving XML DataTo retrieve XML data from an XMLType table you can use a SELECT SQL statement just as you would if you had to query a relational table For example to select the employee with the id set to 100 from the employees XMLType table discussed in the preceding section you might issue the
 

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

ODP.NET - Techniques to Improve Performance while Retrieving Data

ODP NET Techniques to Improve Performance while Retrieving Data Performance tuning is a great subject in Oracle Volumes of books would not be enough to cover every aspect of performance tuning in Oracle However in this section we will only discuss the fundamental performance techniques while working
 

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

ODP.NET - Retrieving Typed Data

ODP NET Retrieving Typed Data While retrieving values from OracleDataReader we can extract information available in individual columns of a particular row either by using column ordinal position values or column names mosgoogle Retrieving Typed Data Using Ordinals ODP NET provides data specific enum
 

ODP.NET - Retrieving Data Using OracleDataReader

ODP NET Retrieving Data Using OracleDataReader OracleDataReader is simply a read only and forward only result set It works only if the database connection is open and it makes sure that the connection is open while you are retrieving data As the data that it retrieves is read only it is a bit faster
 





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