programming languages Online Quiz - 133
programming languages Online Quiz - 133
Questions
Which of the following cannot be used as a modifier for instance variables while defining a class?
- Synchronized
- Native
- Strictfp
- All of these
What is the output of the program?
- 100
- Run time Exception. A final object cannot be changed
- Compilation Error. A final object cannot be changed
- Compilation Error: There cannot be any final objects in a method
What is the output of the program?
- Compilation fails
- 100
- RunTime Exception
- 0
What is the output of the program?
- Blue
- 2
- Runtime Exception
- Compilation Error
can versioning concept applicable to Private assemblies?
- True
- False
Does XML replace HTML?
- True
- False
Does XML replace HTML?
- True
- False
Class C { public static void main(String[] args) { int[]a1[]=new int[3][3]; //3 int a2[4]={3,4,5,6}; //4 int a2[5]; //5 }} What is the result of attempting to compile and run the program ?.
- compiletime error at lines
- compiltime error at line 4,5
- compiletime error at line 3
- Runtime Exception
- None of the above
interface I{ void f1(); // 1 public void f2(); // 2 protected void f3(); // 3 private void f4(); // 4 } which lines generate compile time errors?
- compiletime error at lines 1,2,3,4
- compiletime error at line 3
- compiletime error at line 1
- compiletime error at lines 3,4
- None of the above
class C{ int i; public static void main (String[] args) { int i; //1 private int a = 1; //2 protected int b = 1; //3 public int c = 1; //4 System.out.println(a+b+c); //5 }}
- compiletime error at lines 1,2,3,4,5
- compiletime error at lines 2,3,4,5
- compiletime error at lines 2,3,4
- prints 3
- None of the above