0

What is null time exception error how to resolve it

2nd Dec 2016, 2:47 PM
Neeraj Vaid
Neeraj Vaid - avatar
2 ответов
+ 1
I am guessing you mean null pointer exception? If that is the case then it simply means you declared an object of a certain type and attempted to use the delcared variable before actually pointing it at a certain object.
2nd Dec 2016, 5:03 PM
Ousmane Diaw
+ 1
Let me expand on Ousmane's answer by providing a code example. Only declaring an object would look like the following: Student s1; Declaring and initializing an object (declaring and pointing it): Student s1 = new Student(); Here's an article from Oracle on the subject (https://docs.oracle.com/javase/tutorial/java/javaOO/objectcreation.html)
2nd Jan 2017, 8:11 AM
Chris Winikka
Chris Winikka - avatar