programming languages Online Quiz - 68
programming languages Online Quiz - 68
Questions
We can modify value of literals as below: char *name="David"; *name='X';
- True
- False
The expression: i++ * ++i; is not well defined.
- True
- False
Casting the return value from malloc function is necessary.
- True
- False
In the init(ServletConfig) method of Servlet life cycle, what method can be used to access the ServletConfig object ?
- getServletInfo()
- getInitParameters()
- getServletConfig()
- None
Which of the implicit objects won’t be available ?
- session, request
- exception, request
- exception, config
- session, exception
ejbCreate() method of CMP bean returns
- null
- Primary Key class
- Home Object
- Remote Object
Which of the following is correct syntax for an Abstract class ?
- abstract double area() { }
- abstract double area()
- abstract double area();
- abstract double area(); { }
What is the output of following block of program ? boolean var = false; if(var = true) { System.out.println(“TRUE”); } else { System.out.println(“FALSE”); }
- TRUE
- FALSE
- Compilation Error
- Run-time Error
What is an infinite loop?
- A loop that functions infinitely well
- A loop that runs forever
- A loop that never starts
- A loop that will never function
One of the new features in the JDBC 2.0 API is the ability to move a result set's cursor Backward as well as Forward
- True
- False
Which interface is implemented by the services in order to pass configuration information to a Servlet when it first starts
- Structs Config
- WebXML
- ServletConfig
- None of the above
In JDBC ______________ used to create an instance of a driver and register it with the DriverManager. When you have loaded a driver, it is available for making a connection with a DBMS.
- Class.forName
- Class.JDBCODBC
- Class.JdbcDriver
- Class.Loader
_________ method for posting the information in Action class
- doGet()
- doPost()
- execute()
- validate()
Which abstract class is the super class of all classes used for writing characters. Select the one correct answer.
- FileWriter
- CharWriter
- Writer
- OutputStream
- FileOutputStream
__________ will be automatically invoked when an object is created.
- method
- garbage collection
- finalizer
- Constructor
- none of the above
In order for a source code file, containing the public class Test, to successfully compile, which of the following must be true?
- It must have a package statement
- It must be named Test.java
- It must import java.lang
- It must declare a public class named Test
_____________ is the mechanism that servlets use to have a client hold a small amount of state information associated with the user.
- sessions
- HttpRequest
- HttpResponse
- Java Beans
- Cookies
If you want to modify the servlet, The webserver need to be shutdown.
- True
- False
The following is NOT an example of a data type.
- int
- public
- Button
- void
One of the new features in the JDBC 2.0 API is the ability to move a result set's cursor Backward as well as Forward
- True
- False