GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE
Go To First  |  Previous Question  |  Next Question 
 J2EE  |  Question 82 of 104    Print  
Which (stack or heap) memory will be allocated when an object is created using new operater?

  
Total Answers and Comments: 1 Last Update: September 25, 2007     Asked by: ajay 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: mmptce
 
Heap memory is allocated for the objects and the instance variables that are created by using new operator.
Stack memory is for the method call and thread call.

Above answer was rated as good by the following members:
phdsong
September 25, 2007 08:25:15   
mmptce        

RE: Which (stack or heap) memory will be allocated whe...
Heap memory is allocated for the objects and the instance variables that are created by using new operator.
Stack memory is for the method call and thread call.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

Latest Answer : Struts created internal objects are simple class objects so does not support the all the features provided by ejb container such as transaction managment,persistancy,Security features ,Connection pooling etc. ...
Read Answers (1) | Asked by : sanjay sharma

Latest Answer : OBJECTS SIT ON HEAPPRIMITIVES (LIKE INT, DOUBLE ETC) SIT ON STACKSTACK IS FASTER THAN HEAP.OBJECTS ARE PASSED BY REFERENCE.  PRIMITIVES ARE PASSED BY VALUE.OBJECTS ARE GARBAGE COLLECTED.  PRIMITIVES ARE CLEARED FROM THE STACK BY MOVING THE STACK ...

1. Some websites will have hierarchical display of items. (For eg, on click of a ‘+’ symbol, all items under this item gets listed.). How do you store such structure in database (Note: You can store as XML object. But how do you store in database tables without using XML) ?2. explain 3GL ?
Read Answers (3) | Asked by : ronin

Suppose there are 2500 records to be handled? How Data Access Object (DAO) class will handle it?  
Latest Answer : DAO is one of design patterns. The Data Access Object (or DAO) pattern: 1. Separates a data resource's client interface from its data access mechanisms, 2. adapts a specific data resource's access API to a generic client interface. The ...
Read Answers (2) | Asked by : Anoop

Latest Answer : Pointers allow direct access to memory to users.So wrong acess may result in accessing invalid memory and also probably system memory and there by corrupting memory.But JVM doesnt allow User access to any systems resources.So JVM is better.  ...
Read Answers (1) | Asked by : srinivas

What is difference b/w WITH ServletRequest Object:................RequestDispatcher rd = getServletContext().getRequestDispatcher( "/servlet/XYZServlet"); rd.forward(request, response);with ServletContext 
Latest Answer : In case of ServletRequest, we provide the path relative to http request while in the case of ServletContext we provide path relative to root of context. ...
Read Answers (2) | Asked by : santh kumar

There are 4 domain sever and 4 web application running in a system. A client is acessing all web application at a time. How many servlet context will be created? 
Latest Answer : can have 4 servlet context. as u have 4 web server and this is a distributed application ...

Latest Answer : Heap memory is allocated for the objects and the instance variables that are created by using new operator.Stack memory is for the method call and thread call. ...
Read Answers (1) | Asked by : ajay


 Sponsored Links

 
Related Articles

ODP.NET - OracleCommand Object

ODP NET More About the OracleCommand Object Till now we have seen OracleCommand working with OracleDataReader OracleCommand is not simply meant for OracleDataReader It has got a lot of functionality for itself Let us see few of the most commonly used features of OracleCommand in this section We will
 

Microsoft AJAX Library - Creating Object Members on the Fly

Creating Object Members on the Fly One major difference between OOP in C and ASP NET and OOP in JavaScript is that JavaScript allows creating object members on the fly" This is true for objects and classes that you create yourself and also for JavaScript s own objects and types as well He
 

Microsoft AJAX Library - Object-Oriented JavaScript

Object Oriented JavaScript Objects and classes are implemented differently in JavaScript than in languages such as C VB NET Java or C However when it comes to using them you ll feel on familiar ground You create objects using the new operator and you call their methods or access their fields using t
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

C++ Memory Management operators

C Memory Management operators Need for Memory Management operators The concept of arrays has a block of memory reserved The disadvantage with the concept of arrays is that the programmer must know while programming the size of memory to be allocated in addition to the array size remaining constant m
 

Object-Oriented Client-Server Internet

Object Oriented Client Server Internet OCSI Environments as IT Infrastructure Client Server Basics Object Oriented Client Server Internet OCSI environments provide the IT infrastructure for supporting OCSI applications For our purposes infrastructure refers to operating systems networks middleware
 

JavaScript String Object

JavaScript String Object In this JavaScript tutorial you will learn about String Object purpose of string object in JavaScript purpose of string object indexof method lastIndexOf method and substring method along with syntax and example mosgoogle center Purpose of String Object in JavaScript The mai
 

JavaScript Date Object

JavaScript Date Object In this JavaScript tutorial you will learn about date object and methods of date object explained along with syntax and example mosgoogle center JavaScript Date Object Usage of Date Object Date object of Java Script is used to work with date and times General syntax for defini
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape