-
Which of the following methods defined in Thread class are static?
a) sleep()
b) join()
c) start()
d) yield() -
-
-
Which package is always imported by default
The java.lang package is always imported by default.
-
-
What method is used to specify a container's layout
The setLayout() method is used to specify a container's layout.
-
The concept of polymorphism is often expressed by the phrase
Skill/Topic: AWT & AppletsA) One interface, multiple methodsB) Multiple interface, one MethodC) Multiple interface, Multiple methodD) One interface, One method
-
-
Single Thread and Multiple Thread
What is difference between Single Thread and Multiple Thread?
Explain Single Thread Model Vs. Multi thread model. Support your answer with practical example? -
When does the compiler supply a default constructor for a class
The compiler supplies a default constructor for a class if no other constructors areprovided.
-
Coding question
Given the age of 10 couples(husband and wife), print Number of years of age difference for all the 10 people Input Specification First 10 inputs contain the ages of all husbands And the next 10 are the ages of all wives Output Specification Output should be exactly 10 lines giving the number of years of the age difference between them. Note: output is a positive integer Sample Input 50 40 53 24 78...
_________ is a feature that allows one interface to be used for a general class of actions.
A) EncapsulationB) ClassC) InheritenceD) Polymorphism
What is the difference between a break statement and a continue statement
A break statement results in the termination of the statement to which it applies (switch,for, do, or while). A continue statement is used to end the current loop iteration andreturn control to the loop statement.
What will be the result of compiling and executing the code listed below?
java
public class Finder {
public static void main(String[] args){
System.out.println(X.Y.Z);
}}
class X{
static class Y{ static String Z ="Apple"; }
static W Y = new W();
}
class W{ String Z = "Orange";}
a) Apple
b) Orange
c) Compile time Error
d) Runtime Exception is thrownHow is Java considered tamper free?
I read in the properties of java that it is secured as it is tamper free. I would like to know what is tamper free and how it applies to Java?
Ans