Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Binod

Greenhorn
+ Follow
since Sep 19, 2000
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 Binod

If the variable is not static, but just final
then it should be initialized in all constructors.
Sample question 8 from sun at the following URL
http://suned.sun.com/USA/certification/progsqwa.html


8.
1. import java.awt.*;
2.
3. public class Test extend Frame {
4. public Test() {
5. add( new Label("Hello") );
6. add( new TextField("Hello") );
7. add( new Button("Hello") );
8. pack();
9. show();
10. }
11. public static void main(String args[]) {
12. new Test();
13. }
14.}
What is the result?
A. The code will not complile.
B. A window will appear containing only a Button.
C. An IllegaArgumentException is thrown at line 6.
D. A window will appear but will not contain the Label, TextField, or Button.
E. A window will appear containing a Label at the top, a TextField below the Label, and a Button below the
TextField.
F. A window will appear containing a Label on the left, a TextField to the right of the Label, and a Button to the
right of the TextField .


Answer given is:
B.A window will appear containing only a Button.
Since on line 3, the keyword is "extend" instead of "extends",
program should not compile. Any thoughts???
There is one more typo. Right ")" is missing
in the last println statement.
System.out.println("Color = " + ov[1];
Binod.
Label should appear before the continue statement.
Hence, you should put the label above the for loop.
Binod.
21 years ago
But the code is not compiling when checkVar is
declared as:
volatile boolean checkVar = true;
Any idea?
Binod.
21 years ago
Thanks a lot Jane. It was really helpful.
Binod.
Can someone explain the terms interface and implementation. I am
really confused about these.
Thanks,
Binod.