Wipro Placements MCQ,S with Answers
1. Which is a valid method signature in an interface?
a)private int getArea();
b)protected float getVol(float x);
c) public static void main(String [] args);
d)boolean setFlag(Boolean [] test []);
a)Interfaces allow multiple implementation inheritance.
b)Interfaces can extend any number of other
interfaces.
c) Members of an interface are never static.
d)Members of an interface can always be declared static.
b) The keyword extends is used to specify that a class inherits from an interface.
a)
protected static int answer = 42;
b)volatile static int answer = 42;
c)int answer = 42;
d)private final
static int answer = 42;
a)
private class Javacg{}
b)abstract public class Javacg{}
c)final public class Javacg{}
d)final abstract class Javacg{}
public abstract int sumUp ( int[] arr );
a)public abstract int sumUp ( int[] arr ) { . . . }
b)public int sumUp ( int[] arr ) { . . . }
c) public double sumUp ( int[] arr ) { . . . }
d) public int sumUp ( long[] arr ) { . . . }
b)final void madness(short stop);
c)public Boolean madness(long bow);
d)static char madness(double duty);
10.
Can an abstract class define
both abstract methods and non-
abstract methods ?
c)
Yes-but the child classes do not inherit
the abstract methods.
d)Yes-the child classes inherit both.
11.
Which one of the following
statements is true ?
d)An abstract class can not
extend a concrete class.
Wipro Placements MCQ,S with Answers |
0 Comments