Important LoopHoles of null and NullPointerException in Java Part - 2

preview_player
Показать описание
DURGASOFT is INDIA's No.1 Software Training Center offers
online training on various technologies like JAVA, .NET ,
ANDROID,HADOOP,TESTING TOOLS , ADF, INFORMATICA,TABLEAU,IPHONE,OBIEE,ANJULAR JS, SAP...
courses from Hyderabad & Bangalore -India with Real Time Experts.
so that our Supporting Team will arrange Demo Sessions.
Ph:Call +91-8885252627,+91-7207212428,+91-7207212427,+91-8096969696.
Рекомендации по теме
Комментарии
Автор

Very good explanation with regards to the NPE!!!

harik
Автор

Sir, Could you please tell me what would be the output?? In case If i didn't pass any arguments to the Constructor and performed the opeartion of Sop(s==null) ;

vishnukurmala
Автор

Hi,
char is a primitive type and array of char is also a primitive type then why one can assign null to char array?

char ch[] = null; => why we can assign null to primitive type?
System.out.println(ch == null); => it will print true

public class Test {
public static void main(String args[]){
char s[] = null;
System.out.println(s==null);
}
}

pawarpawan
Автор

Sir, Could you please tell me what would be the output?? In case If i didn't pass any arguments to the Constructor and performed the opeartion of Sop(s==null) ;

vishnukurmala
welcome to shbcf.ru