Java, SQL, and JavaScript Fundamentals
Quiz covering core concepts in Java programming (OOP, exceptions, threading), SQL database operations, and JavaScript syntax
Questions
2.What is the correct JavaScript syntax to write "Hello World"?
- response.write("Hello World")
- document.write("Hello World")
- ("Hello World")
- "Hello World"
7.How does a "for" loop start?
- for (i = 0; i <= 5; i++)
- for i = 1 to 5
- for (i <= 5; i++)
- for (i = 0; i <= 5)
Which SQL statement selects all rows from table called Contest, with column ContestDate having values greater or equal to May 25, 20006?
- SELECT * FROM Contest WHERE ContestDate < '05/25/2006'
- SELECT * FROM Contest HAVING ContestDate >= '05/25/2006'
- SELECT * FROM Contest WHERE ContestDate >= '05/25/2006'
- None of the above
What is the INSERT command used for?
- To retrieve data.
- To insert data.
- To modify data.
- All the above
Which SQL keyword is used to retrieve only unique values?
- UNIQUE
- DISTINCTIVE
- DIFFERENT
- DISTINCT
The TRUNCATE TABLE…?
- checks if the table has primary key specified
- deletes the table
- deletes all rows from a table
- None of the above
Which of the following SQL clauses is used to sort a result set?
- ARRANGE
- ORDER BY
- SORT
- None Of The Above
Java is a strongly-typed language
- True
- False
Newly created threads take the priority of the threads that create them.
- True
- False
A single source file can contain multiple class definitions, each having any access modifier.
- True
- False
Class variables can be accessed only with the class name.
- True
- False
The finalize method will only be called once, if called at all.
- True
- False
A thread is a process
- True
- False
System class provides facilities to load files and libraries, and to create them.
- 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.
- True
- False
All methods within a final class are implicitly final.
- True
- False
All non-assignment operators are evaluated from left to right.
- True
- False
What are various privileges that a user can grant to another user?
- SELECT, CONNECT, RESOURCE
- SELECT,INSERT,DELETE
- INSERT,DELETE,MODIFY,
- None Of The Above
Can a primary key contain more than one columns?
- True
- False
How you will avoid duplicating records in a query?
- DISTINCT
- UNIQUE
- DISTINCT and UNIQUE
- None Of The Above
Can we define exceptions twice in same block ?
- True
- False