0
Alien head

programming languages Online Quiz - 151

Description: programming languages Online Quiz - 151
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

Considering the following code, Which variables may not be referenced correctly at line 12? 1. public class Outer 2. { 3. public int a = 1; 4. private int b = 2; 5. public void method(final int c) 6. { 7. int d = 3; 8. class Inner 9. { 10. private void iMethod(int e) 11. { 12. 13. } 14. } 15. } 16. }

  1. a

  2. d

  3. c

  4. b


Correct Option: B

What results from attempting to compile and run the following code? public class Ternary { public static void main(String args[]) { int a = 5; System.out.println("Value is - " + ((a < 5) ? 9.9 : 9)); } }

  1. prints: Value is - 9

  2. prints: Value is - 5

  3. Compilation error

  4. None of these


Correct Option: D

Is it possible to validate the data using Jasper reports?

  1. True

  2. False


Correct Option: B

Is it possible to embed a image in jasper Reports?

  1. True

  2. False


Correct Option: B

What is the output file format when you compile the jrxml file?

  1. JRPrint file

  2. Jasper file

  3. html file

  4. None of the above


Correct Option: B

Is it possible to embed a Jasper report in to another Jasper Report?

  1. True

  2. False


Correct Option: B

Which is the manadatory tag in JRXML file structure?

  1. Header

  2. Title

  3. Detail

  4. JasperReports


Correct Option: D

Jasper report does not allow to hide column dynamically.

  1. True

  2. False


Correct Option: B

What will happen when you attempt to compile and run the following code? int Output = 10; boolean b1 = false; if((b1 == true) && ((Output += 10) == 20)) { System.out.println("We are equal " + Output); } else { System.out.println("Not equal! " + Output); }

  1. Compilation error, attempting to perform binary comparison on logical data type.

  2. Compilation and output of "We are equal 10".

  3. Compilation and output of "Not equal! 20".

  4. Compilation and output of "Not equal! 10".


Correct Option: D

A method in a class declared as static can only access static class members.

  1. True

  2. False


Correct Option: A

All interface methods must be declared as public when implemented in a class.

  1. True

  2. False


Correct Option: A

All interface methods must be declared as public when implemented in a class.

  1. True

  2. False


Correct Option: A

Methods can be overloaded with a difference only in the type of the return variable.

  1. True

  2. False


Correct Option: B

A static method can refer to any instance variable of the class.

  1. True

  2. False


Correct Option: B

When an instance of a class, or object, is specified as a parameter to a method, a reference to the said object is passed to the method.

  1. True

  2. False


Correct Option: A

What does DTD stand for?

  1. Direct Type Definition

  2. Document Type Definition

  3. Do The Dance

  4. Dynamic Type Definition


Correct Option: B

What does XML stand for?

  1. eXtra Modern Link

  2. eXtensible Markup Language

  3. Example Markup Language

  4. X-Markup Language


Correct Option: B

Parameter entities can appear in

  1. xml file

  2. dtd file

  3. xsl file

  4. Both 1 and 2


Correct Option: B

What is the correct syntax of For Loop in XSLT?

  1. code...

  2. code...

  3. code...

  4. code...


Correct Option: C

Templates are defined by using


Correct Option: D
+ View questions