Core Java Interview Questions – Set 17

What is the difference between an argument and a parameter? While defining method, variables passed in the method are called parameters. While using those methods, values passed to those variables are called arguments. What is the difference between the Boolean & operator and the && operator If an expression involving the Boolean & operator is evaluated, both … Read more

Core Java Interview Questions – Set 16

What restrictions are placed on the location of a package statement within a source code file? A package statement must appear as the first line in a source code file (excluding blank lines and comments). What is the immediate superclass of the Dialog class? Window. What is the difference between set and list? Set stores … Read more

Core Java Interview Questions – Set 15

Which characters may be used as the second character of an identifier, but not s the first character of an identifier? The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier What is an abstract method An … Read more

Core Java Interview Questions – Set 14

What is URL ?– URL stands for Uniform Resource Locator and it points to resource files on the Internet. URL has four components: http://www. address. com:80/index.html, where http – protocol name, address – IP address or host name, 80 – port number and index.html – file path. What is the purpose of the Runtime class? … Read more

Interface Java Interview Questions – Set 13

Which one would you prefer and why The Runnable interface is preferred, as it does not require your object to inherit a thread because when you need multiple inheritance, only interfaces can help you. In the above example we had to extend the Base class so implementing Runnable interface is an obvious choice. Also note how … Read more