-
-
-
-
-
What is the signature of the constructor of a thread class?
A) Thread(Runnable threadob,String threadName)B) Thread(String threadob, Runnable threadName)C) Thread(Runnable threadob,ArrayList threadName)D) Thread(ArrayList threadob,String threadName)
-
Which of the following holds true for the daemon thread, in java runtime,
A) Daemon thread is a low priority threadB) It runs intermittently in the backgroundC) It does the garbage collection operation for the java runtime system.D) All of the above
-
What are all the methods used for Inter Thread communication and what is the class in which these methods are defined?
A) wait(),Object classB) notify(),Object classC) notifyall(),Object classD) wait(), Thread class
-
What are all the values for the following level, respectively?max-priority min-prioritynormal-priority
A) 10,1,5B) 1,10,15C) 10,10,5D) 10,5,1
-
What are all the four states associated in the thread?
A) newB) runnableC) blockedD) dead
-
-
-
-
What is meant by timeslicing or time sharing?
A) Timeslicing is the method of de-allocating CPU time to individual threads in a priority schedule.B) Timeslicing is the method of allocating CPU space to individual threads in a priority schedule.C) Timeslicing is the method of allocating CPU time to individual threads in a priority schedule.D) Timeslicing is the method of de-allocating CPU space to individual threads in a priority schedule.
-
-
Which is the correct description of the OOPs principles?
A) Encapsulation:Is the Mechanism that binds together code and the data it manipulates, and keeps both safe from outside interference and misuse.B) Inheritance:Is the process by which one object acquires the properties of another object.C) Polymorphism:Is a feature that allows one interface to be used for a general class of actions.D) All the above
-
What is the result of expression 5.45 + "3.2"?
A) The double value 8.6B) The string ""8.6"C) The long value 8.D) The String "5.453.2"
-
-
Which of the following statements accurately describe the use of access modifiers within a class definition? (Select multiple)
A) They can be applied to both data & methodsB) They must precede a class's data variables or methodsC) They can follow a class's data variables or methodsD) They can appear in any orderE) They must be applied to data variables first and then to methods
-
Which of the following statements can be used to describe a public method? (Select multiple)
A) It is accessible to all other classes in the hierarchyB) It is accessablde only to subclasses of its parent classC) It represents the public interface of its classD) The only way to gain access to this method is by calling one of the public class methods
-
Java Interview Questions
Ans