Andy Chang

+ Follow
since Mar 24, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andy Chang

B is absolutely not correct.
Java doesn't always create a default constructor for you.
It will create one as long as you didn't have any constructors in your class. So......B is wrong.............

Should my Beer-v1 directory be placed inside the webapps or the webapps/ROOT directory? Using http://localhost:8080/Beer-v1/form.html only loads the page when my Beer-v1 directory is placed inside ROOT.

Either Beer-vi directory be placed inside the webapps or the webapps/ROOT directory is fine. But did you create appropriate WEB-INF directory and web.xml file in the Beer-v1 directory when you placed inside the webapps?
Good luck!
I'd be agree with you, Java
I'd pick C, E

D is not correct. Why? The Java language has three mechanisms dedicated to ensuring proper initialization of objects: instance initializers (also called instance initialization blocks), instance variable initializers, and constructors. It is initializers doing that, not default constructor initializing the instance variables declared in the class.

If assertions are disabled, the program will run with no output.

However, if assertions are enabled, the assert will fail and an AssertionError will be thrown.
An acceptable alternative is:
throw new AssertionError(lang);