New Member FAQ
|
Forums
|
Earn Revenue
Resources
Entrance
Ask Experts
Exam Papers
Jobs
English
Projects
Universities
Colleges
Courses
Schools
Training
My India
Members
|
Communities
|
Business Directory
|
Classifieds
|
Reviews
|
Silverlight Games
|
Peer Appraisal
|
Bookmarks
|
Polls
|
Mentors
|
Links
|
MCA Projects
|
Lobby
|
Gift Shop
|
Chat
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
PROSENJIT MANN...
(847)
Mr. Anindya
(453)
ashish
(422)
Last 7 Days
PROSENJIT MANN...
(1961)
Shobha Manasa
(1774)
Lenin
(1522)
more...
Awards & Gifts
Online Exams
Aptitude Questions
General Aptitude Tests
Medical Entrance
Engineering Entrance
Bank Tests
TOEFL & IELTS Questions
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
Example program for Null Pointer Exception - Java
Posted Date: Total Responses:
0
Posted By:
Annapurna
Member Level:
Gold
Points/Cash
: 2
public class TestRef {
public TestRef () {
System.out.println("tr");
return ;
}
public void print () {
System.out.println ("Instance") ;
}
public static void sprint () {
System.out.println ("Class") ;
}
public static void main(String arfs [ ]) {
System.out.println("1");
TestRef t1 = null ;
System.out.println("2");
TestRef t2 = new TestRef() ;
System.out.println("3");
t1.sprint() ; //this wont throw any null pointer exception because sprint() is static.
System.out.println("4");
t1.print() ; //this will throw null pointer exception
System.out.println("5");
t2.sprint() ;
System.out.println("6");
t2.print() ;
}
}
Project Feedbacks
No feedbacks found. Be the first to respond and make money from
revenue sharing program
.
Post Feedback
You must
Sign In
to post a feedback.
Next Project:
Writing into file - Java
Previous Project:
Passing values - Java
Return to Project Index
Post New Project
Related Projects
Program to show destruction WTC in graphics mode in 'C'
AUDIT FIRM MANAGEMENT SYSTEM
Operations on Binary Search Tree
Creation Of Minqueue In C++
Split Project
Advertise Here
Contact Us
Advertise
Editors
Privacy Policy
Terms Of Use
ISC Technologies.
2006 - 2009 All Rights Reserved.