Answer to Question #20456 in Java | JSP | JSF for nohra

Question #20456
37. If we use a component (i.e., call methods of that component) before instantiating it, then we will generate a ________________ at runtime.
1
Expert's answer
2012-12-18T10:09:42-0500
variable <component> might not have been initialized

for example:

import java.util.LinkedList;

public class test {
&
public static void main(String ...args) {

& LinkedList bob;
& System.out.print(bob.size());
&
}

}

javac test.java
test.java:8: error: variable bob might not have been initialized
& System.out.print(bob.size());
^
1 error

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS