Programmer Questionnaire

17 Questions

Settings
Please wait...
Programmer Quizzes & Trivia

This is a simple competency test. By passing the test, you ensure your resume will be considered for the position. Please provide your email address in the name field so we know which resume is yours.


Questions and Answers
  • 1. 
    What is the default name of an ant project file?
    • A. 

      Ant.xml

    • B. 

      Projectfile.txt

    • C. 

      Projectfile.xml

    • D. 

      Build.xml

  • 2. 
    Which of the following commands would most likely be used to build a JAR?
    • A. 

      Javac

    • B. 

      Jar -cf

    • C. 

      Java -jar

    • D. 

      Jar -xf

  • 3. 
    If you have a JAR file and want to know the API, what is the standard way to get that information?
    • A. 

      Find the source code online

    • B. 

      Use a debugger

    • C. 

      Use javap to decompile the JAR

    • D. 

      Read the javadoc

  • 4. 
    In addition to logging in as root to the mysql server, what does the command "mysql -u root -p mail" do?
    • A. 

      Selects the mail database.

    • B. 

      Uses the password "mail" to log in.

    • C. 

      Lists the tables in the database.

    • D. 

      Connects without requiring a password.

  • 5. 
    Why would this be a bad way to create a backup? mysqldump -u user -p marketing -t person
    • A. 

      The -t flag affects the tabs being output by mysqldump.

    • B. 

      The create statements are omitted.

    • C. 

      The -u flag will affect the permissions on the table being dumped.

    • D. 

      The dump won't be readable without the original password.

  • 6. 
    Which command lists all processes running on a Fedora machine?
    • A. 

      Tasklist

    • B. 

      Top

    • C. 

      Ps -ef

    • D. 

      Jobs

  • 7. 
    Why should you never use "rm -fr /"?
    • A. 

      The -r deletes subdirectories, which you never want to do.

    • B. 

      The -f should never be used, even when deleting a lot of files.

    • C. 

      The / will result in everything being deleted.

    • D. 

      Nothing, this command is safe on any machine.

  • 8. 
    What are the SWT libraries used for?
    • A. 

      Desktop User interface

    • B. 

      Web application interface

    • C. 

      Network Interface

    • D. 

      Eclipse Parser

  • 9. 
    Spring would most likely be run under:
    • A. 

      Tomcat

    • B. 

      Hibernate

    • C. 

      James

    • D. 

      Swt

  • 10. 
    What is wrong with this snippet?public int indexOfName(String name, List names) {  for(String aName : names) {    if (aName.equals(name)) {      return i;    } else {      i++;    }  }    return -1;}
    • A. 

      The List interface cannot be used in the for-each construct.

    • B. 

      The if should check if aName == name

    • C. 

      AName cannot be declared in the for contstruct.

    • D. 

      The variable "i" can't be used this way.

  • 11. 
    If the snippet were rewritten as below, what would it return given a list (alice, bob, charlie, dave) and input "zebra"? (assume the foreach is in alphabetic order)public int indexOfName(String name, List names) {  int i = 0;  for(String aName : names) {    if (aName.equals(name)) {      return i;    } else {      i++;    }  }    return i;}
    • A. 

      4

    • B. 

      -1

    • C. 

      5

    • D. 

      26

  • 12. 
    • A. 

      2

    • B. 

      0

    • C. 

      1

    • D. 

      -1

  • 13. 
    What is the file catalina.out used for?
    • A. 

      Apache logs

    • B. 

      Tomcat logs

    • C. 

      James logs

    • D. 

      Java logs

    • E. 

      MySQL logs

  • 14. 
    The easiest way to determine the length of an array (people) in java is:
    • A. 

      Array_count($people)

    • B. 

      People.length

    • C. 

      Using a for loop

    • D. 

      Arrays.sizeof(people)

    • E. 

      People.length()

  • 15. 
    What command is used to compile a java class?
    • A. 

      Javac HelloWorld.java

    • B. 

      Java --compile HelloWorld.java

    • C. 

      Javap HelloWorld.java

    • D. 

      Javah HelloWorld.java

  • 16. 
    Which command would you use to execute commands on a remote unix server?
  • 17. 
    Finally, are you still interested in the job?
    • A. 

      Yes

    • B. 

      No