Friday, 12 February 2016

KPSC Lecturer in Computer Science Solved Paper (002/2012) 23-11-2015 - Part 9

81.       A class variable is a variable declared as ……………. inside a class.
(A) const            (B) final
(C) static            (D) extends
Answer: C
82.       ………….. determines the point of time at which a variable comes into existence in memory.
(A) data type     (B) functions
(C) scope          (D) storage class
Answer: D
83.       What does the following program output?
public class ABC
{
public static int function1(int p, int q)
{
if (q==0) return 1;
else if (p<q) return 0;
else
return function1(p-1,q)+function1(p-1,q-1);
}
public static void main(String[] args)
{
System.out.println(ABC.function1(3,2));
}
}
(A) 4                   (B) 3
(C) 2                   (D) 1
Answer: B
84.       The following program prints:
public class XYZ
{
public static void main (String[] args)
{
byte val=(byte) 128;
System.out.println(val);
}
}
(A) -128             (B) 128
(C) 127              (D) -127
Answer:-Question Cancelled
85.       The following Java program segment prints:
String S1=new String("Hello");
String S2=new String("Hello");
if (S1==S2)
System.out.println("They are same");
else
System.out.println("They are not same");
(A) They are same                   (B) They are not same
(C) Garbage                              (D) Run time error
Answer: B

86.       Asynchronous Java Script and XML (Ajax) incorporates
P: Asynchronous data retrieval using XMLHttpRequest
Q: Standards based presentation using XHTML and CSS
R: Data interchanges and manipulation using XML and XSLT
S: Dynamic display and interaction using the Document Object Model
(A) P and R                   (B) P and Q
(C) P, R and S              (D) P, Q, R and S
Answer: D
87.       In Java, MVC stands for
(A) Model Video Controller    (B) Mobile View Controller
(C) Model View Controller     (D) None of the above
Answer: C
88.       Among the following, the Java package which is used by the compiler itself and need not be explicitly imported is:
(A) java.lang                 (B) java.awt
(C) java.math                (D) java.applet
Answer: A
89.       Distributed applications are created in Java using …………..
(A) RMI and JDBC      (B) CORBA and JDBC
(C) RMI and CORBA  (D) None of the above
Answer: C
90.    DMSP stands for:
(A) Distributed Mail Support Plan
(B) Document Management System Protocol
(C) Digital Media Services Protocol
(D) Distributed Mail System Protocol
Answer: D



0 comments:

Post a Comment