0% found this document useful (0 votes)
11 views

In Java Suppose We Declare Any Constructor There Will Not Be Any Default Const. For That Class

The document notes that in Java, if a constructor is declared for a class, there will be no default constructor provided, creating an object of that class without calling a constructor will result in a null pointer exception at runtime, and importing the java.lang package can cause runtime errors.

Uploaded by

arunsmile
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

In Java Suppose We Declare Any Constructor There Will Not Be Any Default Const. For That Class

The document notes that in Java, if a constructor is declared for a class, there will be no default constructor provided, creating an object of that class without calling a constructor will result in a null pointer exception at runtime, and importing the java.lang package can cause runtime errors.

Uploaded by

arunsmile
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

NOTE: in java suppose we declare any constructor there will not be any default

const. for that class.


NOTE: class_name obj; //just this will give runtime error nullpointer
NOTE: package java.lang; // Runtime gives error
NOTE:

You might also like