HOME      BLOG       FORUMS      CONTACT       ABOUT

Core Java interview questions – Part 6

91. What is java byte code?
Byte code is an sort of intermediate code. The byte code is processed by virtual machine.

92. What is method overloading?
Method overloading is the process of creating a new method with the same name and different signature.

93. What is method overriding?
Method overriding is the process of giving a new definition for an existing method in its child class.

94. What is finalize() ?
Finalize is a protected method in java. When the garbage collector is executes , it will first call finalize( ), and on the next garbage-collection it reclaim the objects memory. So finalize( ), gives you the chance to perform some cleanup operation at the time of garbage collection.

95. What is multi-threading?
Multi-threading is the scenario where more than one threads are running.

96. What is deadlock?
Deadlock is a situation when two threads are waiting on each other to release a resource. Each thread waiting for a resource which is held by the other waiting thread.

97. What is the difference between Iterator and Enumeration?
Iterator differ from enumeration in two ways Iterator allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics. And , method names have been improved.

98. What is the Locale class?
A Locale object represents a specific geographical, political, or cultural region

99. What is internationalization?
Internationalization is the process of designing an application so that it can be adapted to various languages and regions without changes.

100. What is anonymous class ?
An anonymous class is a type of inner class that don’t have any name.

101. What is the difference between URL and URLConnection?
A URL represents the location of a resource, and a URLConnection represents a link for accessing or communicating with the resource at the location.

102. What are the two important TCP Socket classes?
ServerSocket and Socket. ServerSocket is useful for two-way socket communication. Socket class help us to read and write through the sockets. getInputStream() and getOutputStream() are the two methods available in Socket class.

103. Strings are immutable. But String s=”Hello”; String s1=s+”World” returns HelloWorld how ?
Here actually a new object is created with the value of HelloWorld

104. What is classpath?
Classpath is the path where Java looks for loading class at run time and compile time.

105. What is path?
It is an the location where the OS will look for finding out the executable files and commands.

Share

Tags: , , ,


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

11 Responses to “Core Java interview questions – Part 6”

  1. Good collection….

  2. Deepak Tanwar Says:

    Thanks Sir…these questions are helping me very much..

  3. I am very happy with it .it very useful for me.

    Thanks
    Satyaveer
    9667761129

  4. thanks……..

  5. Thank U …

    It helps alot to the freshers..

  6. nice collection,,, really useful,,,,

  7. cool section! here’s some more:

    1) Junior java developer
    a) Basic ocjp (former scjp) questions:
    – What does static, final mean, purposes;
    – How many accesibility modifiers exist? Please describe them.
    – Why do you need a main method?
    – How many constructors can you have?
    – Define overwriting and overloading
    – Give java API implementations for overwriting and overloading
    – Describe the String class – unique properties
    – StringBuilder vs StringBuffer
    – Collections : please describe, give some examples and compare them to eachother
    – ArrayList vs Vector
    – HashMap vs HashTable
    – What’s a tree
    – What’s a map
    – Multithreading: describe the management in java
    – What’s a semaphone?
    – How many states are there for threads?
    – Describe the usage for synchronized word (2)
    – Serialization in java – a descrition and usage
    – Garbage collection in java – description and usage
    – Can you guarantee the garbage collection process?
    b) Simple design pattern questions:
    – Singleton please describe main features and coding
    – Factory please describe main features and coding
    – Have you used others? please describe them

    2) Intermediate and Senior level – depending on rate of good responses, additional questions to 1):

    http://centraladvisor.com/programming-2/java/java-developer-interview

  8. Really Nice..and Thanks..

  9. Nice collection really its helpful when we go for interview

  10. nice but less in number

  11. Its really cool collection of questions but There is small correction in question number 53 where you have specified the access should not be less restrictive while overriding the method, but in fact it is in reverse it can be less restrictive but should not be more restrictive.

Leave a Reply