Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is NullPointerException and how to handle it?
What is NullPointerException and how to handle it?
✍: Guest
When an object is not initialized, the default value is null. When the following things happen, the NullPointerException is thrown:
--Calling the instance method of a null object.
--Accessing or modifying the field of a null object.
--Taking the length of a null as if it were an array.
--Accessing or modifying the slots of null as if it were an array.
--Throwing null as if it were a Throwable value.
The NullPointerException is a runtime exception. The best practice is to catch such exception even if it is not required by language design.
2012-05-17, 2768👍, 0💬
Popular Posts:
How To Merge Cells in a Column? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells If you ...
Write out a function that prints out all the permutations of a string. For example, abc would give y...
How can I check for HTML errors? HTML validators check HTML documents against a formal definition of...
Can you explain in brief how the ASP.NET authentication process works? ASP.NET does not run by itsel...
How To Retrieve the Count of Updated Rows? - Oracle DBA FAQ - Working with Database Objects in PL/SQ...