Answer SCJP Drag and Drop
Answer SCJP Drag and Drop
Answer SCJP Drag and Drop
Ques : 281,258
Ques: 259
started
ran
interrupting
ended
(no more output)
Ques: 260
class Alpha {
public void bar( int… x ) {}
public void bar( int x ) {}
}
public class Beta extends Alpha {
public void bar(int x) {}
public int bar(String x) {return 1;}
public void bar(int x, int y) {}
}
Ques: 261
interface Reloadable
{
public void reload();
}
class Edit
{
public void Edit(){}
}
Ques: 262
package alpha;
public class Alpha{
private String alpha;
public Alpha(){this("A");}
protected Alpha(String a){alpha = a;}
}
package beta;
public class Beta extends alpha.Alpha{
public Beta(String a){super(a);}
}
Ques: 263
class A {}
Well here A doesn't extend any class so by default it will extend Object class, so option 5 suits it
- 5.car is an object
class A{ B c; C c; }
Here A has an object of B and C. There is no option matching this one
class A{ B b;}
Here A has one object of B. So option 2 suits it - 2.car has a steering wheel as a car can have
only one steering wheel
Ques: 264
Pi approximately 3.141593
and E is approximately true
Ques: 265
1).ArrayList<String> x1 = new ArrayList<String>();
foo(x1); ---- Compilation of the first statement succeeds, but
compilation fails due to error in the second statement.
Ques: 266
Ques: 267
Ques: 269
java.util.Set --------> contains no pair of elements e1 and e2, such that e1.equals(e2)
Ques: 270
Ques: 271
Ques: 272
Ques: 273
int amount=10;
public void doubleAmount(){amount=Doubler.doubleMe(amount);}
Ques: 274
t.join();
t.run();
t.doIt();
Ques: 275
Ques: 276
Ques: 278
Ques: 279
enum Element
{
EARTH,WIND,FIRE{
public String info(){
return "Hot";
}
};
public String info()
{
return "element";
}
}
Ques: 280
run() java.lang.Thread
wait() java.lang.Object
notify() java.lang.Object
sleep() java.lang.Thread
start() java.lang.Thread
join() java.lang.Thread
Ques: 281
Ques: 282
for(String dir:dirs)
{
path=path+File.separator+dir;
}
System.out.println(path);
File file = new File(path,filename);
return file.exists();
}
}
Ques: 283
(temp=buffReader.readLine())!=null
(IOException e){
Ques: 284
while(scanner.hasnext)
{
if(scanner.hasnextboolean)
{
s.o.p(scanner.nextboolean);
}
else
scanner.next;
}
Ques: 285
Dog is a Animal
Ques: 286
Refractor this class to use generics without changing the cods’s behavior.
import java.util.*;
public class TestGenericConversion {
public static void main(String[] args) {
List<String> list = new LinkedList<String>();
list.add(“one”);
list.add(“two”);
System.out.print(list.get(0).length());
}
Ques: 287