Latest Java Interview Questions 2016 for Freshers - Part 3 - Prepare for Interview - By Placement Dunia

Latest Java Interview Questions 2016 for Freshers - Part 3 - Prepare for Interview - By Placement Dunia.
19. What are drivers available?
 a) JDBC-ODBC Bridge driver b) Native API Partly-Java driver
 c) JDBC-Net Pure Java driver d) Native-Protocol Pure Java driver

20. What is stored procedure?
 Stored procedure is a group of SQL statements that forms a logical unit and performs a particular task. Stored Procedures are used to encapsulate a set of operations or queries to execute on database. Stored procedures can be compiled and executed with different parameters and results and may have any combination of input/output parameters.
21. What is the Java API?
 The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets.
22. Why there are no global variables in Java?
 Global variables are globally accessible. Java does not support globally accessible variables due to following reasons:
1)The global variables breaks the referential transparency
2)Global variables creates collisions in namespace.
23. What are Encapsulation, Inheritance and Polymorphism?
 Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse. Inheritance is the process by which one object acquires the properties of another object. Polymorphism is the feature that allows one interface to be used for general class actions.
24. What is the use of bin and lib in JDK?
 Bin contains all tools such as javac, appletviewer, awt tool, etc., whereas lib contains API and all packages.
25. What is method overloading and method overriding?
 Method overloading: When a method in a class having the same method name with different arguments is said to be method overloading. Method overriding : When a method in a class having the same method name with same arguments is said to be method overriding.

26. What is the difference between this() and super()?
 this() can be used to invoke a constructor of the same class whereas super() can be used to invoke a super class constructor.
Share this job with your friends !