Java and SAS Programming Languages Quiz

Test your knowledge of Java and SAS programming concepts including data shadowing, method overloading, constructors, SAS statements, macros, PROC SQL, ODS, arrays, and date handling.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which Interface has no methods.

  1. Servlet
  2. Runnable
  3. Serializable
  4. ActionListener
Question 2 Multiple Choice (Single Answer)

When was James Gosling born.

  1. Jan 31, 2012
  2. Aug 08, 1987
  3. Aug 18, 1951
  4. May 19, 1955
Question 3 Multiple Choice (Single Answer)

Which time span is used to interpret two-digit year values if the YEARCUTOFF= option is set to 1950?

  1. 1950-2049
  2. 1950-2050
  3. 1949-2050
  4. 1950-2000
Question 4 Multiple Choice (Single Answer)

Which DO statement would not process all the elements in the tmp array shown below? array tmp{*} x y z a;

  1. do i=1 to dim(tmp);
  2. do i=1 to dim(*);
  3. do i=1,2,3,4;
  4. do i=1 to 4;
Question 5 Multiple Choice (Single Answer)

Which keyword, when added to the PROC FORMAT statement, will display all the formats in your catalog?

  1. FMTCAT
  2. CATALOG
  3. FMTLIB
  4. LISTFMT
Question 6 Multiple Choice (Single Answer)

Using ODS statements, how many types of output can you generate at once?

  1. 2
  2. 3
  3. 1 (only listing output)
  4. as many as you want
Question 7 Multiple Choice (Single Answer)

Which of the following would you use to compare the result of investing $X a year for 6 years in three different banks that compound interest monthly? Assume a fixed rate for the 6-year period.

  1. DO WHILE statement
  2. nested DO loops
  3. a DO group
  4. DO UNTIL statement
Question 8 Multiple Choice (Single Answer)

Macro character functions

  1. can be used to manipulate character strings in macro variable values.
  2. have the same basic syntax as the corresponding DATA step functions and yield similar results.
  3. all of the above
  4. none of the above
Question 9 Multiple Choice (Single Answer)

Assuming that you began your SAS session today, which of the following statements correctly sets the macro variable currdate to today's date?

  1. %let currdate = %sysfunc(today(), worddate.);
  2. %let currdate = &sysdate9;
  3. %let currdate = %sysfunc(date());
  4. all of the above
Question 10 Multiple Choice (Single Answer)

What happens if you use a GROUP BY clause in a PROC SQL step without a summary function?

  1. The step does not execute.
  2. The first numeric column is summed by default.
  3. The GROUP BY clause is changed to an ORDER BY clause.
  4. The step executes but does not group or sort data.
Question 11 True/False

SAS is not portable ...

  1. True
  2. False
Question 12 True/False

SAS is a free format language

  1. True
  2. False
Question 13 True/False

SAS Statements are not case sensitive

  1. True
  2. False
Question 14 True/False

SAS Key words can't be used as variable names

  1. True
  2. False
Question 15 True/False

SAS Statements can span more than one line

  1. True
  2. False
Question 16 Multiple Choice (Single Answer)

We all know that constructors are nothing but methods in java. But, as all the methods are either static or non-static , Then, what is the type-access modifier for the constructor?

  1. static
  2. non-static
  3. special-mixed type
  4. not-defined
Question 17 True/False

The constructors do not have a return-type.

  1. True
  2. False
Question 18 Multiple Choice (Single Answer)

Which of the following functions will be invoked on the function call- show(10);

  1. show(byte b){ }
  2. show(long l){ }
  3. none of the above
  4. compilation error
Question 19 Multiple Choice (Single Answer)

Which of the following methods will be invoked when the call is-- show(10L);

  1. show(float f){ }
  2. show(int i){ }
  3. show(double d){ }
  4. none of the above
Question 20 Multiple Choice (Single Answer)
class A  {
    int x=10;
    public static void show()    {
        int x=20;
        System.out.println(x);
    }
}

The Output we always get is-- 20,, But Why... What is the name of this concept??

  1. Data Hiding
  2. Data Shadowing
  3. Data Obscuring
  4. None of the Above