Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers
Antivirus Faqs_Questions_And_Answers Software Tips Faqs_Questions_And_Answers ERP Faqs_Questions_And_Answers Internet Faqs_Questions_And_Answers Spoken English Faqs_Questions_And_Answers Web Designing Faqs_Questions_And_Answers SEO Tips Faqs_Questions_And_Answers Hacking
Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers Faqs_Questions_And_Answers
SAP Faqs
C Faqs        C++ Faqs        Java Faqs        J2ee Faqs        Springs Faqs        Hibernate Faqs        Web sphere Faqs        Web Logic Server Faqs   
WordPress        Siebel Faqs        Shell Scripting Faqs        Perl Scripting Faqs        Open Source        Data Ware Housing Faqs        Joomla Faqs
Ajax        Oracle Apps Faqs        Testing Tools Faqs        Mainframes Faqs        Tibco Faqs        PHP Faqs        .Net Faqs       Operating System
 
Custom Search
RMI Interview Questions
EJB Interview Questions
JSP Interview Questions
JMS Interview Questions
JDBC Interview Questions
OOPS Interview Questions
Servlet Interview Questions
Applets Interview Questions
Awt Swing Interview Questions
Java Threads Interview Questions
Architectures of Java Faqs
Java Lang Package Faqs
Architectures of Java Faqs
Java Garbage Collection Faqs
Java Exception Handling Faqs
Core Java and Advanced Java
JAVA job interview Q&A
51 What is data encapsulation?
Ans: Encapsulation may be used by creating 'get' and 'set' methods in a class (JAVABEAN) which are used to access the fields of the object. Typically the fields are made private while the get and set methods are public. Encapsulation can be used to validate the data that is to be stored, to do calculations on data that is stored in a field or fields, or for use in introspection (often the case when using javabeans in Struts, for instance). Wrapping of data and function into a single unit is called as data encapsulation. Encapsulation is nothing but wrapping up the data and associated methods into a single unit in such a way that  data can be accessed with the help of associated methods. Encapsulation provides data security.  It is nothing but data hiding.
52 How can I swap two variables without using a third variable?
Ans:

Add two variables and assign the value into First variable. Subtract the Second value with the result Value. and assign to Second variable. Subtract the Result of First Variable With Result of Second Variable and Assign to First Variable. Example:
int a=5,b=10;a=a+b; b=a-b; a=a-b;.

53 How can I swap two variables without using a third variable?
Ans:

No the program fails to compile. The compiler says that the main method is already defined in the class.

54 What is reflection API? How are they implemented?
Ans:

Reflection is the process of introspecting the features and state of a class at runtime and dynamically manipulate at run time. This is supported using Reflection API with built-in classes like Class, Method, Fields, Constructors etc. Example: Using Java Reflection API we can get the class name, by using the getName method.

55 Does JVM maintain a cache by itself? Does the JVM allocate objects in heap?Is this the OS heap or the heap maintained by the JVM? Why?
Ans:

Yes, the JVM maintains a cache by itself. It creates the Objects on the HEAP, but references to those objects are on the STACK.

56 What is phantom memory?
Ans: Phantom memory is false memory. Memory that does not exist in reality.
57 Can a method be static and synchronized?
Ans:

A static method can be synchronized. If you do so, the JVM will obtain a lock on the java.lang. Class instance associated with the object. It is similar to saying:
          synchronized(XYZ.class) {
          }.

58

What is difference between String and StringTokenizer?

Ans:

A StringTokenizer is utility class used to break up string.
Example:
StringTokenizer st = new StringTokenizer("Hello World");
     while (st.hasMoreTokens()) {
         System.out.println(st.nextToken());
     }
Output:
Hello
World.

59

what is Applet?

Ans:

Applet  is a dynamic and interactive program that runs inside a web page displayed by a java capable browser,It can be downloaded in the clinet environment & start running there.

 
60

what is the life cycle of applet?

Ans:

The life cycle fo applet is

  1. intiliasation
  2. service
  3. Destroy
Page :    1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Top

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player