You are not logged in.

#1 2016-11-08 05:30:08

Muhammad
User RankUser RankUser RankUser RankUser RankUser Rank
بِسمِ اللَّهِ الرَّحمٰنِ الرَّحيمِ
From: Sahiwal Division
Registered: 2012-03-22
Posts: 22,197
Website

Sun Certified Java Programmer (SCJP) Quiz Question.

Java Quizzes Sun Certified Java Programmer (SCJP)

Question:
Find the given file.

package com.concretepage;
public class Computer implements Device{
  public void doIt() { } 
}
abstract class Phone1 extends Computer { }
abstract class Phone2 extends Computer{
  public void doIt(int x) { }
}
class Phone3 extends Computer implements Device{
	public void doStuff() { } 
}
interface Device {
	public void doIt();
}
 

What is the result?

Option A):
Compilation fails with an error on line 10
Option B):
Compilation fails with an error on line 3
Option C):
Compilation fails with an error on line 6
Option D):
Compilation succeeds

Correct Answer is Option D):
Compilation succeeds


Online Web Tutorials And Interview Questions With Answers Forum:
https://globalguideline.com/forum/

2016-11-08 05:30:08

Advertisement
Ads By Google

Re: Sun Certified Java Programmer (SCJP) Quiz Question.



\n

Board footer