File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mock Exam Errata and the fly likes JQuest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "JQuest " Watch "JQuest " New topic


madhuri vl
Ranch Hand

Joined: Jan 17, 2001
Posts: 86
Here are 2 Q from JQuest
What should be at //A to output running
class RunThread implements runnable {
RunTest rt = new RunTest();
Thread t = new Thread(rt);
// A
public void run() {
void go(){
void start(int i) {
a) t.start();
d) start(1);
a,c are the given answers. Why is c? I feel only a
Here is my 2nd Q
2) class A {
public void method(int i, floatf){
//Some code
public class B extends A {
// Comment here
What should be // here
a) void method (inti,floatf)
b) public void method(inta,floatb)
c) public void method()
d) protected int method(floatb,int a)
Answers given are b,c,d. i feel only b,c
Can anybody explain?

Lokesh Mahajan

Joined: Feb 01, 2001
Posts: 22
Hello Dear
In first example insted of RunTest it should be RunThread,
Problem is what is going to print "running",so if you give just simple System.out.println("running"); it is going to print "running", here it is not going to call run method,so only single "running"is the output.
so both the option given are correct.
About 2 question.
option d is also right because it is the case of overloading ,
option b & c are the case of overriding.
madhuri vl
Ranch Hand

Joined: Jan 17, 2001
Posts: 86
Thank you. so changing the order of the parameters is Overloading.Ok
I agree. Here's the link:
subject: JQuest
It's not a secret anymore!