-
Core Java Question
Will it compile and run?? If No ... please explain?
java
public class Test{
public static void main(String asd[]){
System.out.println(" Test!! ");
}
}
protected class A{
}
private class B extends A{
}
-
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...
State true or false :- Final methods can be overridden.
A) TrueB) False
Which containers use a border Layout as their default layout
The window, Frame and Dialog classes use a border layout as their default layout.
What is the difference between static and non-static variables
A static variable is associated with the class as a whole rather than with specific instancesof a class. Non-static variables take on unique values with each object instance.
What is the range of the char type?">What is the range of the char type?
A) 0 to 215-1 B) 0 to 216-1 C) 0 to 215 D) 0 to 216
Java is a Programming Language.
A) TrueB) False
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.
Is it true the JAVA is realy a plateform indepandent?
no, because Java does not support multiple inheritance directly.
Ans