mary lee

Greenhorn
+ Follow
since Apr 03, 2001
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mary lee

I have passed SCJP, and want to go ahead
since I do not have enough money and time, I want to choose one
from java developer and j2ee architect, but I am not sure which one is more useful
can anyone give me some suggestion? thanks
could any one tell me some mock exam websites for developer
thanks a lot
why does the following code generate 22, can anyone explain
class Base {
int i;
Base() {
add(1);
}
void add(int v) {
i += v;
}
void print() {
System.out.println(i);
}
}
class Extension extends Base {
Extension() {
add(2);
}
void add(int v) {
i += v*2;
}
}
public class Qd073 {
public static void main(String args[]) {
bogo(new Extension());
}
static void bogo(Base b) {
b.add(8);
b.print();
}
}
the website of maha's mock exam: http://www.javaranch.com/maha/_Mock_Exams/_mock_exams.html
there is a link to MindQ
thanks a lot for all the information
yes
I did not notice the newname and newestname are different
a careless mistake
46. This piece of code:

TextArea ta = new TextArea( 10, 3 );

Produces (select all correct statements):

a) a TextArea with 10 rows and up to 3 columns
b) a TextArea with a variable number of columns not less than 10 and 3 rows
c) a TextArea that may not contain more than 30 characters
d) a TextArea that can be edited
the answer is a and d
I just donot understand why upto 3 columns , is not is exactly 3 columns?
45. Which methods does java.lang.Math include for trigonometric computations?
a) sin()
b) cos()
c) tan()
d) aSin()
e) aCos()
f) aTan()
g) toDegree()
the answer is a b c, but in some other mock exams(which I donot remember, aSin, aCos, aTan are also trigonometric )
can anyone explain?
look at this question:
36. How many objects are eligible for garbage collection once execution has reached the line labeled Line A?
String name;
String newName = "Nick";
newName = "Jason";
name = "Frieda";
String newestName = name;
name = null;
//Line A
the answer is 1
but I think should be 2, there are three String objects "Nick"
"Jason" and "Frieda", at line A only "Frieda" is still referrenced by newestName , other two are not referrenced any more
is it right?
could anyone help? the garbage collection always make me confused
36. How many objects are eligible for garbage collection once execution has reached the line labeled Line A?
String name;
String newName = "Nick";
newName = "Jason";
name = "Frieda";
String newestName = name;
name = null;
//Line A
the answer is 1
but I think should be 2, there are three String objects "Nick"
"Jason" and "Frieda", only "Frieda" is still referrenced by newestName , other two are not referrenced any more
is it right?
could anyone help?

21 years ago