Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. What is output of following code?
package pack1;
class A
{
public A()
{
System.out.print(“object created”);
}
}
package pack2;
import pack1.*;
class B
{
A a=new A();
}
Correct Answer is : db
2. Which among the following for public specifier is false?
Correct Answer is : columns_priv
3. A class has its default constructor defined as public. Class B inherits class A privately. The class:
Correct Answer is : Host
4. Which specifier can be used to inherit protected members as protected in subclass but public as public in subclass?
Correct Answer is : RESET MASTER LOGS
5. Which among the following is true for public class?
Correct Answer is : abcxyz
6. If a class doesn’t have public members, then________
Correct Answer is : TRUE
7. In multi-level inheritance(all public) , the public members of parent/superclass will ________
Correct Answer is : TRUE
8. Which specifier allows to secure the public members of base class in inherited classes?
Correct Answer is : event_scheduler = ON
9. What are public member functions?
Correct Answer is : SHOW VARIABLES LIKE ‘event_scheduler’
10. Which among the following is true for public member functions?
Correct Answer is : DISABLED
11. Which type of member functions get inherited in the same specifier in which the inheritance is done? (If private inheritance is used, those become private and if public used, those become public)
Correct Answer is : foreign
12. Which syntax among the following is correct for public member functions?
Correct Answer is : FALSE
13. Which syntax is applicable to declare public member functions in C++?
Correct Answer is : cascaded
14. In java, which rule among the following is applicable?
Correct Answer is : InnoDB
15. How many public members are allowed in a class?
Correct Answer is : referential integrity
16. Which is not a proper way to access public members of a class?
Correct Answer is : REFERENCES
17. Which call is correct for public members of a nested class?
Correct Answer is : TRUE
18. Which public function call among the following is correct outside the class, if return type is void (C++)?
Correct Answer is : DROP
19. If public members are to be restricted from getting inherited from the subclass of the class containing that function, which alternative is best?
Correct Answer is : ALTER TABLE
20. A derived class object can access the public members of the base class.