Java, SQL, and JavaScript Fundamentals

Quiz covering core concepts in Java programming (OOP, exceptions, threading), SQL database operations, and JavaScript syntax

21 Questions Published

Questions

Question 1 Multiple Choice (Multiple Answers)

2.What is the correct JavaScript syntax to write "Hello World"?

  1. response.write("Hello World")
  2. document.write("Hello World")
  3. ("Hello World")
  4. "Hello World"
Question 2 Multiple Choice (Multiple Answers)

7.How does a "for" loop start?

  1. for (i = 0; i <= 5; i++)
  2. for i = 1 to 5
  3. for (i <= 5; i++)
  4. for (i = 0; i <= 5)
Question 3 Multiple Choice (Single Answer)

Which SQL statement selects all rows from table called Contest, with column ContestDate having values greater or equal to May 25, 20006?

  1. SELECT * FROM Contest WHERE ContestDate < '05/25/2006'
  2. SELECT * FROM Contest HAVING ContestDate >= '05/25/2006'
  3. SELECT * FROM Contest WHERE ContestDate >= '05/25/2006'
  4. None of the above
Question 4 Multiple Choice (Single Answer)

What is the INSERT command used for?

  1. To retrieve data.
  2. To insert data.
  3. To modify data.
  4. All the above
Question 5 Multiple Choice (Single Answer)

Which SQL keyword is used to retrieve only unique values?

  1. UNIQUE
  2. DISTINCTIVE
  3. DIFFERENT
  4. DISTINCT
Question 6 Multiple Choice (Single Answer)

The TRUNCATE TABLE…?

  1. checks if the table has primary key specified
  2. deletes the table
  3. deletes all rows from a table
  4. None of the above
Question 7 Multiple Choice (Single Answer)

Which of the following SQL clauses is used to sort a result set?

  1. ARRANGE
  2. ORDER BY
  3. SORT
  4. None Of The Above
Question 8 True/False

Java is a strongly-typed language

  1. True
  2. False
Question 9 True/False

Newly created threads take the priority of the threads that create them.

  1. True
  2. False
Question 10 True/False

A single source file can contain multiple class definitions, each having any access modifier.

  1. True
  2. False
Question 11 True/False

Class variables can be accessed only with the class name.

  1. True
  2. False
Question 12 True/False

The finalize method will only be called once, if called at all.

  1. True
  2. False
Question 13 True/False

A thread is a process

  1. True
  2. False
Question 14 True/False

System class provides facilities to load files and libraries, and to create them.

  1. True
  2. False
Question 15 True/False

When a method is overridden, the overriding method can throw only the same exceptions as the overridden method, a subset of them or subclasses of the exceptions.

  1. True
  2. False
Question 16 True/False

All methods within a final class are implicitly final.

  1. True
  2. False
Question 17 True/False

All non-assignment operators are evaluated from left to right.

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

What are various privileges that a user can grant to another user?

  1. SELECT, CONNECT, RESOURCE
  2. SELECT,INSERT,DELETE
  3. INSERT,DELETE,MODIFY,
  4. None Of The Above
Question 19 True/False

Can a primary key contain more than one columns?

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

How you will avoid duplicating records in a query?

  1. DISTINCT
  2. UNIQUE
  3. DISTINCT and UNIQUE
  4. None Of The Above
Question 21 True/False

Can we define exceptions twice in same block ?

  1. True
  2. False