HI,
I am confuse little bit with these questions, these are from jqplus mock exam.
Q#1
if u cerate a List using the following line of code
java.awt.List list = new List();
which of the given statement are correct?
1. It will not allow multiple selections
2. The list has four visible items.
3. A vertical scroll bar will be added automatically if needed.
4. A list cannot be constructed this way.
5. None of the above.
given answer 1,2,3. i dont have idea about '2'.
is it correct? Q#2
How can u declare variable 'i' so that it is not visible outside the package '
test'
package test;
class Test
{
XXX int i;
/* Lots of code*/
}
1. private
2. public
3. protected
4. no access modifer.
given answer is 1,4. i do agree with '4' but i don't think '1' is correct answer.
please explain it to me.
vivek