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.
Tags: core java, core java interview questions, interview, interview questions
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.
June 9th, 2012 at 9:44 AM
Good collection….
June 16th, 2012 at 5:51 AM
Thanks Sir…these questions are helping me very much..
June 25th, 2012 at 1:18 AM
I am very happy with it .it very useful for me.
Thanks
Satyaveer
9667761129
June 27th, 2012 at 10:38 AM
thanks……..
July 18th, 2012 at 10:57 PM
Thank U …
It helps alot to the freshers..
July 19th, 2012 at 9:00 AM
nice collection,,, really useful,,,,
August 1st, 2012 at 8:28 AM
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
October 12th, 2012 at 10:33 AM
Really Nice..and Thanks..
October 17th, 2012 at 1:38 AM
Nice collection really its helpful when we go for interview
January 23rd, 2013 at 8:34 AM
nice but less in number