Programming Tip of the Day – Common Exceptions

Null Reference

C# – Object Reference not set to an instance of an object

JAVA – java.lang.nullpointerexception

– WOW, most favorite and common exception in the world.  Easy to avoid, just do a NULL Check before working on the variable or object.

C# – Index was out of the bounds of an array

JAVA – Array out of bounds exception 

– Probably the second most common exception in the world, again just do a simple check of Array Length and Current Index before working on the actual array item.

We at GUVI believe it is often the most basic of things that matter most.  Once you start getting your basics right, you can really go from level to level quite easily.  There is always more to learn, but the foundation is very important for future learnings.

 

You may also like...

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x