Find jobs | Jobseekers
Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Career Services Resume Services Interview questions Articles Books

Interview Questions


Java Interview questions part 2

Part 1 | Part 2 | Part 3 | Part 4 | Part 5

Java Interview questions with answers posted on July 22, 2008 at 17:10 pm
Question - What is class loader? Explain the purpose of Bootstrap class loader.

Answer
Class loader finds and loads the class at runtime. Java class loader can load classes from across network or from other sources like HTTP, FTP etc.

Bootstrap class loader is responsible for loading classes that are used by JVM to function properly from “jdk/jre/lib/rt.jar”.

Question - Explain the difference between traditional java Array and Arraylist class.
Answer
Traditional java array is fixed length whereas ArrayList supports dynamic arrays that can grow depending on requirement.
Question - Define TreeSet class.

Answer
TreeSet class is used to store large amount of data and uses tree for storage. Items are stored in ascending order. TreeSet sorts all data properly even if data are entered in a unsorted manner.  

Question - String object is immutable, Explain.

Answer
This means once you have created String object and assigned a value, you can’t change the value of the object. If you try to change the value, a new object is created and previous one still there in the memory.  

Question - What is StringBuffer class?

Answer
StringBuffer class is same as String class with the exception that it is mutable. It allows change and doesn’t create a new instance on change of value. 

Question - Explain the difference between pass by value and pass by reference.  

Answer
In pass by value, a copy of variable is passed to the method; the values of the variable can’t be changed in the method.

In pass by reference, a pointer of the variable is passed and the values can be modified in the method.

Question - Explain access modifiers in JAVA.

Answer
Java provides four access modifiers

Public – The member with public modifier can be access by any other class.
Protected – The member with protected modifier can be accessed by the derived class only.
Private – The member with Private modifier can be accessed within the class.
Default – Default represents Private access in JAVA. 

Question - What is serialization?

Answer
It is the process of converting object instance into stream of bytes. This conversion is required when objects have to be sent over network.

Question - Define Savepoints in a transaction.

Answer
Using Savepoint, you can mark one or more places in a transaction and you can perform rollback to one of those savepoint at any point of time during transaction process. 

Question - What are filter class in java? 

Answer
The filter class in java can manipulate request before reaches to the web server. It can also manipulate response before it reaches the client browser.

Question - How do we consume a web service in java? 

Answer
Client can consume web services in java in 3 ways.

Using stub
Using DLL
Using dynamic proxies.          

Part 1 | Part 2 | Part 3 | Part 4 | Part 5

Click here to share knowledge by answering these questions

  1. Define class and object.
  2. What is Java Virtual Machine?
  3. Define Just-In-Time compilation.
  4. Explain how we implement inheritance in JAVA.
  5. Explain Abstract class.
  6. What are packages?
  7. Define Interface.
  8. Define constructors and destructors in JAVA.
  9. List out the difference between an Interface and an Abstract class.
  10. What is garbage collection in Java?
  11. Explain in brief synchronization in respect to multithreading.
  12. What are the different ways of using thread in Java?
  13. Define pass by reference and pass by value.
  14. Explain in brief HashMap and Map.
  15. List out difference between HashMap and HashTable.
  16. List out difference between Vector and ArrayList.
  17. Define Swing and Awt.
  18. What is the difference between a constructor and a method?
  19. Define Iterator in JAVA.
  20. What is static in JAVA?
  21. What is final in JAVA?
  22. Explain Collections API in JAVA.
  23. Describe List interface in JAVA.
  24. What is the Vector class?
  25. When do we use Locale class?
  26. What is the use of the SimpleTimeZone class?
  27. What is the Collection interface?
  28. What is the use of Hashtable?
  29. Define class and object.
Click here to share knowledge by answering these questions

 



 
Today's Hot Jobs
C++  SQL Server
.NET  Java  Oracle
Finance  Marketing
Seekers  Employers
Copyright © 2008 CareerRide.com. All rights reserved.