Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Mock Exam Errata and the fly likes R & H Mock Exam Q Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "R & H Mock Exam Q" Watch "R & H Mock Exam Q" New topic
Author

R & H Mock Exam Q

Kevin Cary
Ranch Hand

Joined: Jan 24, 2001
Posts: 53
Question asks if following code will compile and run:
1. class TestThread3 extends Thread {
2. public void run() {
3. System.out.println("Running");
4. System.out.println("Done");
5. }
6.
7. private void xxx() {
8. System.out.println("In xxx");
9. }
10.
11. public static void main(String args[]) {
12. TestThread3 tt3 = new TestThread3();
13. ttt.xxx();
14. ttt.start();
12. }
13. }
According to R&H Mock exam, this will compile and run. However it will not.
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
Why do you say it won't? What kind of error are you seeing?
Bill
Maja Grabovac
Greenhorn

Joined: Feb 27, 2001
Posts: 16
This is probably a typo, because the compiler complains about the varible ttt. (tt3 is the onlu instance of TestThread3)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: R & H Mock Exam Q