Home Answers Viewqa JSP-Servlet Pointer in java

 
 


Vikram
Pointer in java
1 Answer(s)      3 years and 8 months ago
Posted in : JSP-Servlet

View Answers

January 10, 2012 at 11:07 AM


**The Java language does not provide pointers. Instead all objects are handled by references not to be confused with pointers or C++ references. The difference is that Java references do not refer directly to the memory location but rather contain the pointer to the actual memory location which the programmer cannot get direct access to. This extra level of indirection is required for GC to work. When GC kicks in and frees objects that are no longer in use it then does heap compaction to defragment the heap. To do this some objects must be moved around in memory. This is possible because there is only one place where this pointer is located in the reference and thus the memory can be relocated old location freed and pointer changed. In C++ this is not possible because pointers are copied all over the code. It is also true that pointers are dangerous and lead to memory leaks memory corruption invalid memory access e.g. from uninitialized and improperly initialized variables indexing out of bounds and many bugs due to pointer arithmetic. References and other features related to these avoid all these problems.**









Related Pages:
is there is pointer in java or not??
is there is pointer in java or not??  is there is pointer in java or not plz tell me this with brief?? thank you
null pointer exception in java
null pointer exception in java  What is null pointer exception in Java and when it occurs? Show it with an example.Thanks!   Java Null Pointer Exception
pointer error java
pointer error java  How to catch null pointer errors in java if the if(value != null) or null
Pointer in java - JSP-Servlet
Pointer in java   Hello ! All i know that java has no pointer type facility. but i have a problem to related pointer. Actually m using a dll and in that dll there is function that rec add of byte type variables address
Java null pointer exception
Java null pointer exception  Hi I've made an array of Book objects that I made, the array is called library and it can hold 100 books, but currently there are 6. The Book objects contain three private strings; an author, a title
Null Pointer Exception
Null Pointer Exception  whis is the Null Pointer Exception in java? or define Null Pointer Exception with exp?   NullPointerException occurs, when you try to implement an application without referencing the object
Null Pointer Exception - Java Beginners
Null Pointer Exception  How Can I Handle NullPoiniterException without using try/catch mechanism
pointer
pointer  CONSTRTUCT A STRUCTURE FOR EMPLOYEE RECORD THAT CONTAINS A PERSON'S NAME, AGE, EMPLOYEE AND SALARY.WRITE A STATEMENT THAT DECLARES A VARIABLE empInfo and a pointer emPtr of type EMPLOYEE.then use the pointer to display
Java null pointer exception handling
Java null pointer exception handling   What is a java.lang.NullPointerException? Why do we use this exception class and when it occurs in any java... pointer exception handling What is Java NullPointerException? In Java
What is a pointer and does Java support pointers?
What is a pointer and does Java support pointers?   Hi, What is a pointer and does Java support pointers? Thanks   Hi, Pointer.... for more related to [Java Pointer][1] [1]http://www.roseindia.net
how to move pointer in Textfield to newline
how to move pointer in Textfield to newline  consider my case... for a java beginner please send me by mail.   Thank you very much sir... code that can be helpful for a java beginner please send me by mail
Null Pointer Exception
Null Pointer Exception        Null pointer exceptions are the most common run time  exception error arises during execution of java program. All values in Java
Why the null Pointer exception is comming? - Java Beginners
Why the null Pointer exception is comming?  My code is given below: import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import
when do we get null pointer exception in java
when do we get null pointer exception in java  can anybody explain me abt null pointer exception? like in wt situation do v get NPE? Are these 2 strings same? String str; String str=null
Pointer a variable
Pointer a variable  hii, Pointer is a variable or not ?   hello, Yes, a pointer is a variable
null pointer
null pointer  dear sir , what is mean by null pointer in c
pointer to a reference
pointer to a reference  pointer to a reference in C++    #include <iostream> using namespace std; void foo1(int& x) { int* p = &x; *p = 123; } void foo2(int* x) { int
pointer to a reference
pointer to a reference  pointer to a reference in C++    #include <iostream> using namespace std; void foo1(int& x) { int* p = &x; *p = 123; } void foo2(int* x) { int
Function pointer in c
Function pointer in c  What is the difference between function call with function pointer and without function pointer(normal function call
c-language pointer functions
c-language pointer functions  what is the execution process of character pointer functions with example
incomplete pointer type NSMutableDictionary
incomplete pointer type NSMutableDictionary  My iphone app is throwing the "incomplete pointer type NSMutableDictionary" issue on running the iphone app. What is this issue and how can i remove it. NSMutableDictionary *dict
Httpservletresponse null pointer exception.
Httpservletresponse null pointer exception.  What is Httpservletresponse null pointer exception?   NullPointerException occurs when we try to implement an application without referencing the object and allocating
Null pointer exceptation-Java Servlet web application,Problem connecting with MYSQL database
Null pointer exceptation-Java Servlet web application,Problem connecting.... T_T I have develop my java web application in window Environment and now i.... T_T I have develop my java web application in window Environment and now i
NUll POINTER EXCEPTION
NUll POINTER EXCEPTION  public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException... of code i m getting null pointer Exception. can some one please explain what
null pointer exceptions
null pointer exceptions  import java.util.*; public class employee { static int ch; static int emp[]; String name; int id,age; float sal; void insert() { employee[] emp=new employee[90]; Scanner r
null pointer error
null pointer error  Respected sir there is a problem in this code when i add any new record in ms access data base from my code, it gives only null pointer error sir please help me my code are given below compilatation class
null pointer error
null pointer error  Respected sir there is a problem in this code when i add any new record in ms access data base from my code, it gives only null pointer error sir please help me my code are given below compilatation class
Null pointer exception in hibernate - Hibernate
Null pointer exception in hibernate  Hi i am getting null pointer exception.while running the program in hibernate at roseindia.tutorial.hibernate.FirstExample. i copied the total files from roseindia tutorial. the program
C Structure Pointer
C Structure Pointer       This section illustrates you the concept of Structure Pointer in C. You... through structure pointer. For that, we declare the structure type st consisting
Pointer Example
Pointer Example      ... are trying to create a pointer which location is based on the screen touch pointer. The source code for this small example of touch screen application
Pointer in C
About Pointer A pointer is a variable which contain the memory address...; used  when dealing with pointer. 1    &   ... operator 3    ->   structure pointer
null pointer exception cannot be removed
null pointer exception cannot be removed  class list { public int integer; public String elem; public list next; private Exception nothing; public int r; public list() { this(null,null,0
Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code
Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code
Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code
Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code
C Pointer to a function
C Pointer to a function       In this section, you will learn how to use 'Pointer'  function in C. C provides a special feature of  pointer to a function
Null pointer exception error in Jsp - JSP-Servlet
Null pointer exception error in Jsp  Hi i write a login page. when i validate the login value then the nullpointer exception error is occured. my..." attributes in the input tag So id,userpwd gives null pointer exception
Null pointer exception error in Jsp - JSP-Servlet
Null pointer exception error in Jsp  Expert:Majid Hi i write a login page. when i validate the login value then the nullpointer exception error..." attributes in the input tag So id,userpwd gives null pointer exception. Thanks
Handle Null Pointer Exception while text file upload
Handle Null Pointer Exception while text file upload  I want the code for handling null pointer exception in jsp page. That is I need an error page for null pointer exception. The cause for null pointer exception is while
Clicking F5 and reentering value throws Null pointer exception
Clicking F5 and reentering value throws Null pointer exception  Hi, My page performs search operation.Normally when i enter a value and click... refresh my page and enter any value it is throwing Null pointer exception.can
Pointer and Structure in C
Description: In this tutorial you will see how pointer is used with structure. This is a very important example because all data-structure program work... the address of object to p *p allow the pointer to access the objects *p.roll is same
C Multiple Indirection
Indirection. C permits the pointer to point to another pointer. This creates many layers of pointer and therefore called as multiple indirection. A pointer to a pointer has declaration is similar to that of a normal pointer but have more
Pointers - Java Interview Questions
Pointers  Why Pointer are not used in JAVA?  There is no need to store the address of the another variable in java So that pointers are not used in java
C array of pointers
. A pointer is a variable that contains the memory location of another variable...; Syntax of declaring a pointer:   data_type_name * variable name First... by the pointer. The asterisk tells the compiler that you are creating a pointer
java - Java Beginners
java  i want code, which will drag a java button from one panel or frame to other panel or frame.The button should be added on other panel when the user click on that panel.The button position should be the mouse pointer position
java pointers - Java Beginners
java pointers  "There is no need to store the address of the another variable in java So that pointers are not used in java."how it is different... diectly any address.ok and in c++ if we have any pointer to pointing a private
java serialization
java serialization  when we serialize the object while this object having the another object reference but we dont want to serialize that object inside the serializable object? if we do this it throw the null pointer exception
filing - Java Beginners
filing  i want to ask when we work file read in c++ then we use seekg to move pointer one location. how can i did handle in java
check null exception java
check null exception java  check null exception java - How to check the null exception on Java?   The null pointer exception in java occurs... on it. See the example null pointer exception

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.