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.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s