Can u please help me to find the corrcet answers fro the folowing
(A)
consider the following
1.public Object methoda()
{
2.Object o=new Object();
3.Object o1[]=new Object[1];
4.o1[0]=o;
5.o=null;
6.o=new Object();
7.o1[0]=null;
8.return o1[0];
}
when will the object o referenced earlier was
available for garbage collector.
a) just after line 4
b) just after line 5
c) just after line 6
d) just after line 7
e) never in this method
---------------------------------
(B)which will be used to encode chars for output
a) java.io.outputStream
b) java.io.OutputStreamWriter
c) java.io.encodedoutputwriter
d) java.io.encodedwriter
e) java.io.BufferedOutputStream
-----------------------------------
(C)
Which layout has to be used in the Panel if the
Panel has textArea Label, button vertically in a window and You want to
Increase the Height of textArea vertically?
------------------------------------
(D)
byte[] A,B[];
byte C[][],D[][];
byte[][] E;
Which of these will cause an Error?
P) A=B;
Q) B=C;
R) C=D;
S) Both P and Q;
T) Both R and S;
-------------------------
(E)
In a Panel a TextArea in the top and below it
Label another Button is added below the Label. Which
Layout is prefeered so that the TextArea occupies the
entire vertical free space when the Panel is resized?.
Options Given are
1)GridBagLayout
2)GridLayout
3)FlowLayout
4)BorderLayout
---------------------------------
(F)
In a Panel a TextArea in the top and below it
Label another Button is added below the Label. Which
Layout is prefeered so that the TextArea occupies the
entire vertical free space when the Panel is resized?.
Options Given are
1)GridBagLayout
2)GridLayout
3)FlowLayout
4)BorderLayout
-------------------------
(G)
class demo implements Runnable{
int i;
Thread t;
public demo(int d){
i=d;
}
public void run()
{
try{
Thread.sleep(50000);
}catch(InterruptedException e){}
}
}
class test1{
public static void main(
String args[]){
demo d=new demo(5);
Thread t=new Thread(d);
t.start();
//
System.out.println(d.i);
}
}
56
Which of the following methods can reasonably put in
the commented line above to print the value 5?.
Given Options
t.wait()
t.notify()
t.join()
t.yield()
---------------------------------
Which of the following method will return degree
value"?.
Given Options
Math.cos(Math.toDegrees(42))
Math.cos(Math.toRadians(42))
Math.cosine(42)