0

programming languages Online Quiz - 216

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

Given: class Clidders { public final void flipper() { System.out.println("Clidder"); } } public class Clidlets extends Clidders { public void flipper() { System.out.println("Flip a Clidlet"); super.flipper(); } public static void main(String [] args) { new Clidlets().flipper(); } } What is the result?

  1. Flip a Clidlet

  2. Flip a Clidder

  3. Flip a Clidder Flip a Clidlet

  4. Flip a Clidlet Flip a Clidder

  5. Compilation fails


Correct Option: E

Given: public abstract interface Frobnicate { public void twiddle(String s) ; } Which is a correct class? (Choose all that apply.)

  1. public abstract class Frob implements Frobnicate { public abstract void twiddle(String s){} }

  2. public abstract class Frob implements Frobnicate { }

  3. public class Frob extends Frobnicate { public void twiddle(Integer i) { } }

  4. public class Frob implements Frobnicate { public void twiddle(Integer i) { } }

  5. public class Frob implements Frobnicate { public void twiddle(String i) { } public void twiddle(Integer s) { } }


Correct Option: B,E

Given: class Clidder { private final void flipper() { System.out.println ("Clidder"); } } public class Clidlet extends Clidder { public final void flipper() { System.out.println("Clidlet"); } public static void main(String [] args) { new Clidlet().flipper(); } }

  1. Clidlet

  2. Clidder

  3. Clidder Clidlet

  4. Clidlet Clidder

  5. Compilation fails.


Correct Option: A

Given: class Uber { static int y = 2; Uber(int x) { this(); y = y * 2; } Uber() { y++; } } class Minor extends Uber { Minor() { super(y); y = y + 3; } public static void main(String [] args) { new Minor(); System.out.println(y); } } What is the result?

  1. 6

  2. 7

  3. 8

  4. 9

  5. Compilation fails.

  6. An exception is thrown.


Correct Option: D
  1. Woop is-a Hmpf and has-a zing.

  2. zing is-a Woop and has-a Hmpf.

  3. Hmpf has-a Woop and Woop is-a Zing.

  4. Woop has-a Hmpf and Woop is-a zing.

  5. Zing has-a Hmpf and Zing is-a Woop.


Correct Option: D
  1. It should be easy to write programs that process XML documents

  2. Optional features should be kept to a minimum, ideally zero

  3. XML documents should be human legible and reasonably clear

  4. None


Correct Option: B

The XML declaration is which of the following?

  1. Optional but makes a document more portable

  2. Highly discouraged by W3C standards

  3. Recommended for HTML programming only

  4. None


Correct Option: B

Attribute values must always be enclosed by single or double quotes

  1. parenthesis

  2. 'greater-than and less-than signs'

  3. single or double quotes

  4. brackets


Correct Option: C
  1. ALL , AUTOMATIC , USER

  2. AUTO , SYS , LOCAL

  3. ALL , LOCAL ,USERDEFINED

  4. ALL , AUTO , GLOBAL


Correct Option: A
  1. title "Total Sales for ’&month’ ";

  2. title "Total Sales for ’month’";

  3. title "Total Sales for &month";

  4. title Total Sales for "&month";


Correct Option: C
  1. Sales Report for Southeast Area

  2. Sales Report for "Southeast" Area

  3. Sales Report for "Southeast" Area

    • Sales Report for "Southeast" Area *

Correct Option: D
  1. A macro variable can be defined and referenced anywhere in a SAS program except within data lines. within the data lines of a DATALINES statement.

  2. Macro variables are always user-defined, and their values remain constant until they are changed by the user.

  3. Macro variables are text strings that are independent of SAS data sets.

  4. The values of macro variables can be up to 65,534 characters long.


Correct Option: B
  1. Referencing a nonexistent macro variable results in a warning message. Referencing an invalid macro variable name results in an error message.

  2. Referencing a nonexistent macro variable results in a error message. Referencing an invalid macro variable name results in an warning message.

  3. Referencing a nonexistent macro variable and invalid macro variable name results in an error message.

  4. Referencing a nonexistent macro variable and invalid macro variable name results in an warning message.


Correct Option: A
- Hide questions