Java Programming and SQL Basics

Test your knowledge of Java programming fundamentals (OOP concepts, syntax, applets) and SQL database queries (joins, group functions, clauses)

20 Questions Published

Questions

Question 1 True/False

We can use Group functions in the WHERE clause

  1. True
  2. False
Question 2 True/False

We can nest Group Functions

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

When is a Cartesian product formed?

  1. When a join condition is omitted.
  2. When a join condition is invalid.
  3. All rows in the first table are joined to all rows in the second table
  4. All of the above.
Question 4 True/False

In a join condition it is mandatory to specify the table name along with the column name

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

Which of the following WHERE clauses represent equi-join?

  1. Table1.column1=Table2.column2
  2. Table1.column1=Table2.column1
  3. Table1.column2=Table2.column1
  4. None of the above
Question 6 Multiple Choice (Single Answer)

The minimum number of join statements required to join 10 tables together are:

  1. 9
  2. 11
  3. 5
  4. 12
  5. None of the above
Question 7 True/False

A Non equi-join is a join condition that does not contain an equality operator.

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

An outer join is used to:

  1. Return records which have no direct match
  2. Return records which have direct match
  3. Return all the records
  4. None of the above
Question 9 Multiple Choice (Single Answer)

Outer join operator is indicated as

  1. (+)
  2. (-)
  3. (*)
  4. +
Question 10 True/False

Self Join is used to join a table to itself.

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

We can use MIN and MAX for any

  1. Numeric data
  2. Data type
  3. Character data
  4. None of the above
Question 12 Multiple Choice (Single Answer)

Which is the clause used to restrict groups?

  1. Having
  2. Where
  3. restrict
  4. exclude
Question 13 Multiple Choice (Single Answer)

Which function forces group functions to include null values?

  1. Group By
  2. NVL
  3. Order By
  4. Include NULL
Question 14 Multiple Choice (Single Answer)

_____________ is the process by which one object acquires the properties of another object.

  1. Encapsulation
  2. Class
  3. Inheritance
  4. Polymorphism
Question 15 True/False

The Separator, Comma is Used to separate package names from subpackages and classes

  1. True
  2. False
Question 16 True/False

The print( ) method is just like println( ), except that it does not output a newline character after each call.

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

An _________ is a special kind of Java program that is designed to be transmitted over the Internet.

  1. Viewlet
  2. Applet
  3. Servlet
  4. Object
Question 18 True/False

A constant value in Java is created by using a literal representation of it.

  1. True
  2. False
Question 19 True/False

Java allows two or more statements to be grouped into blocks of code called Code Blocks.

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

_________ is a feature that allows one interface to be used for a general class of actions.

  1. Encapsulation
  2. Class
  3. Inheritance
  4. Polymorphism