Total members 11889 |It is currently Fri Mar 29, 2024 8:54 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





One of code steps you do in your C coding with pointers , is to to check on the pointer before you use it ( just to be in safe )

for example :
Code:
    MyClass *mypointer=new MyClass(param1,param2...) ;
    *mypointer->function();

what will happen if the "mypointer" not allocated ,null pointer error .to avoid this .
Code:
    MyClass *mypointer=new MyClass(param1,param2...) ;
      if(mypointer !=NULL )
    *mypointer->function();
   



You will avoid these errors , just by this small check , higher level like Java contain no pointers .In fact this is one of power stands in Java .So you don't need to take care about this there . It can be caught easy as exception.



_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Safe Programming
 Thread Safe     -  
 ALP programming     -  
 C++ programming     -  
 How do you know when to use the right programming language?     -  
 i want some help in java programming     -  
 Java Programming help please?     -  
 Different Styles of Programming     -  
 Programming.PHP.2nd.Edition.zip     -  
 Suggest course for programming     -  
 javascript programming     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com