What is a Container in a GUI?

Answer :
A Container contains and arranges other components (including other containers) through the use of layout managers, which use specific layout policies to determine where components should go as a function of the size of the container.

Is Java a super set of JavaScript?

Answer :
No. They are completely different. Some syntax may be similar.

Does the code in finally block get executed if there is an exception and a return statement in a catch block?

Answer :
If an exception occurs and there is a return statement in catch block, the finally block is still executed. The finally block will not be executed when the System.exit(1) statement is executed earlier or the system shut down earlier or the memory is used up earlier before the thread goes to finally block.

Explain the usage of Java packages?

Answer :
This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorized classes.

What is Serialization and deserialization ?

Answer :
Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.

What are the Object and Class classes used for?

Answer :
The Object class is the highest-level class in the Java class hierarchy. The Class class is used to represent the classes and interfaces that are loaded by a Java program.

How do you restrict a user to cut and paste from the html page?

Answer :
Using Servlet or client side scripts to lock keyboard keys. It is one of solutions.
 
Copyright © Interview Questions and answers - Blogger Theme by BloggerThemes & freecsstemplates - Sponsored by Internet Entrepreneur