Java and SQL Programming Basics
Quiz covering Java programming concepts and SQL database commands
Questions
Question 1 Multiple Choice (Single Answer)
Which one is true ?
- A view can be created as a join on two or more tables
- A view can't be created as a join on two or more tables
- A view can't have an ORDER BY clause in SELECT statement
- A view can't be created with a GROUP BY clause in SELECT statement
Question 2 Multiple Choice (Single Answer)
You have dropped a table from where a VIEW was created . What would be the status of that VIEW
- View dropped also
- View becomes invalid
- View remains as it is
- View is accessible
Question 3 Multiple Choice (Single Answer)
The EMPLOYEE table contains info about employees. One of your employees got married , so her last name changed . What would be the command to reflect that change in the table ?
- UPDATE
- ALTER
- INSERT
- CREATE
Question 4 True/False
Java does not have multiple inheritance
- True
- False
Question 5 Multiple Choice (Single Answer)
To implement business Logic seperately and independently which MVC pattern should be used?
- MVC 1
- MVC 2
- MVC 3
- None
Question 6 True/False
Strings Are Immutable Objects
- True
- False
Question 7 Multiple Choice (Single Answer)
String x = new String("Life");System.out.println( x.length);
- 4
- 5
- Runtime Error
- Compiler Error
Question 8 Multiple Choice (Single Answer)
What is the output of following.
public static void main(String[] args) {
int b=3;
byte c=b/2;
System.out.println("&c="+ &c);
}
- 1.5
- 1
- RuntimeException
- CompileTime Error