Java important question


1.  what is the difference between runtime polimorphism, and compiletime polimorphism ? 
 
2.  what is runtime polimorphism? give an example program ? 
 
3.  What is differnce between byte code and unicode? 
 
4.  why java is not 100% oops  
 
5.  What is the difference between .equals and ==? 
 
6.  How to check infinity value? when we passed too large number in String and cast in to float value it 
 
7.  how to access Blob and Clob data values from oracle thru java? 
 
8.  advantages of Implementing Runnable over extending Thread 
 
9.  A Inner class is defined in a parameterized function of outer class then the inner class is able to access 
 
10.  why is collection framework called as framework? 

11.  why should every class in java extend Object class?  
 
12.  what is the difference between trusted and untrusted applet? 
 
13.  Is there any provision in java to find the address of a particular memory location?(like & in 'C' languag 
 
14.  what is the difference between synchronized block and normal block ? 
 
15.  what is a refferent? 
 
16.  how do you push an applet in to the servlet? 
 
17.  Why is the Object class super class of all the classes? 
 
18.  Can we serialize the static variable? 
 
19.  1)what happens if i do this=null?2)how to swap 2 variables without using third temp variable in java?3)constructors 
 
20.  what is the main difference between input, output stream? 
 
21.  how to use printer option in java or is there any method to use print command? 
 
22.  let say there are two interfaces like the followinginterface int1{int meth1();}interface int22{int meth1();}ok 
 
23.  In client-server approach, how to get an IP address of remote machine, and how we can find whether tht 
 
24.  why we cannot define constructor of super class in a sub class ? 
 
25.  why java shouldbe preferred,when we can get the sameoutput using VB orany otherlanguages. Howcan we convincethe 
 
26.  How can we inherit the two independent classes in one class? for example, we have two independent classes 
 
27.  what is the datatypes in java? 
 
28.  What is a Singleton class, what is it\'s significance? Thanks in advance! 

29.  what is the difference between java and c and c++? 

30.  why java dosen\'t support pointers?  
 
31.  why java is not 100% object oriented language?? 
 
32.  Differences between servlet context and servlet config? 
 
33.  what is the difference between java and core java 
 
34.  how and when to prevent inheritance? 
 
35.  What method should the key class of hashmap override 
 
36.  What is the difference b/w Iterator & ListIterator 
 
37.  what is difference between runnable and thread ?why we use static class 
 
38.  What is a tagged interface? 

39.  What is the difference between a CallableStatement and PreparedStatement? 
 
40.  what significance of protected Constructors? 

41.  in Execption handling What is exactly difference between throws and throw? 
 
42.  Expain about the AJAX technology in Java that is very HOT in software market. What is Jasper Report.? 
 
43.  How can we write our own arraylist without using collections? 
 
44.  Why default constructor of base class will be called first in java? 
 
45.  Can i limit the initial capacity of vector in java? 
 
46.  What are the Differences between Tread class and Runnable ?
  
47.  Threading : - How can you pass data between two threads? 
 
48.  what is collction framework?How it is working?Explain. 
 
49.  In which case i can go for Anonymous class? 
 
50.  How to create own Marker Interface with example 
 
51.  Tell me the differences between enumeration and iteration?Which can use where in realtime? 
 
52.  what is the notation for matrix in java? 

53.  What is working of bean in EJB 

54.  what is default Buffersize of any Bufferedclass?  

 
55.  what are the other ways to prevent a class from being subclassed.one way is to declare the class final.does 

 
56.  Please Give me an example for User defined Exception 

57.  Why there is no guarentee for System.gc() method will perform garbage collection for a particular tim 

 
58.  What is the difference between interrupt() and join() in threads?Give an example program? 

 
59.  Strings are immutable.But String s="Hello";   

 
60.  What is the difference between classpath and path variable? 

 
61.  If we have two public classes in a single java file ,how i have to give the name of the particular java 

 
62.  Is there any difference between Execution Engine and the JIT in java? 
 
63.   How single threaded model works after implementation in class, basically architecture point of vie 

 
64.  if two overloaded methods are-test(Object xyz) and test(Customer cust)[Assume Customer is a class with 

 
65.  WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR AND HASHMAP AND HASHTABLE? 

66.  when programmer using the vector and arrylist? and when ur using linkedlist and hashmap and hashtabl 

 
67.  Can wehave run() method directly without start() method in threads? 

 
68.  How to use JNI in java? and what are Struts and jini?and how to apply native code in java? 

69.  why the container does not support multiple layout managers 

 
70.  which class is the super class for all classes in java.lang package? 

 
71.  What are differences between Enumeration, ArrayList, Hashtable and Collections and Collection? 
 
72.  How many JVM could be run on an operating system. if only one then what is the logical reason. 

73.  What is JVM Heap Size? How does it affect the performance of the Application? 

74.  we know that Object class is super class of every class & a class extends only one class. so how is 

 
75.  what is difference between string and stringtokenizer? 
76.  how can you load DLL files when your java class is loading first time ? 
77.  if interface & abstract class have same methods & abstract class also not contain any implementation 

 
78.  what is difference between array & arraylist? 
 
79.  what is difference between java.lang .Class and java.lang.ClassLoader? What is the hierarchy of ClassLoad 

 
80.  how can we use hashset in collection interface? 

81.  why java does not support inheritance of multiple superclasses?what is achieved by inheritance?why there 

 
82.  What is collection framework?what interfaces and classes support collection framework? 

 
83.  what is difference between instance and object.?what are the all difference between interface and abstract 

84.  what's the difference b/w Java command line arg.s & C command line arg.s? 

85.  What is the difference between String and StringBuffer? Which is better to use in project? 

 
86.  what is a green thread? 

 
87.  what is JIT? Is it bundled with JDK? If so what is the role of interpreter(java)? plz explain in detai 

 
88.  When exactly a static block is loaded in Java ? 

 
89.  How we know a class is Serialized or not from a package 

 
90.  When will a static variable is loaded?is it at compile time or runtime? 
91.  What is the difference between transient variable,volatile variable 

 
92.  what is daemon threads? 

 
93.  Wat is the Repeater function...and Wat does Data Integrity means? 

 
94.  Canweimplement aninterface in JSP Page?If yesHow?write thecode? 

 
95.  why cant we compare two objects with ==,why we should use only .equals() for objects. 
96.  why pointers are not used in java 

 
97.  Constructor can not be inherited.Why? Tell me the reason. 

 
98.  Please give me answer why we use Interface though it contain only blank implementation.  

 
99.  I studied that "Abstract class means ,it doesn't maintain the complete information about the particular 
 
100.  What is abstraction? 

101.  what will this printint i=10000System.out.println(i*i);and explain why ? 

102.  How to access the values java to javascript? 

 
103.  What is the statament we need to use particularly when using type2 and type 4 drivers( example for type 

104.  How can u tell HashTable is Synchronized?(IBM-chennai) 

 
105.  How to Synchronize the HashMap 

106.  I have been doing the java project using JBuilder 2.0 as front end and oracle 8i as back-end .I can't 
107.  write classes/methods to calculate the totallength of a set of lines given the start and end points taking 

 
108.  what is the difference between tomact and weblogic 
109.  Why java does not support multiple inheritance.why we go for interfaces 

 
110.  How many JVM's we can run in a system? 

 
111.  What is the difference between Model Data and Default Model Data 
 
112.  How many threads will be created for a java program, when it is compail & run? and what are they? 

 
113.  How can we emplement strutsframework using jsp or servlets.Tellme. 

 
114.  Like Object class is inherited by every class, means every class that you define in java is implicitely 

 
115.  How i can validate the user, Is there any java api is there for that. Or i can use my one business logic. 

 
116.  how to compare Stringbuffer objects?  

117.  Why should i use ejb as i can do it in servlet? 

 
118.  what is the difference between instance,object,refference,class. 

119.  How many ways do we have to load a class 

120.  What is mutable and immutable in Strings? 

 
121.  How u can implement hashmap if u r not having in JAVA? 

122.  How We Can We write our own exceptions? 

 
123.  what is the difference between putting a class as abstract or if any of method in class is declared as 
 
124.  how do you configure session bean for bean-managed transactions? 

 
125.  I need some more information about interface. For Example there is no any functionality inside the method 

126.  What is the difference between Enumeration and Iterator?. When i can use Enumeration and when i can use 

 
127.  what is the purpose of interface? And tell the difference between the class and interface?  

128.  How can u move/drag a component placed in Swing Container? 

 
129.  How can u move/drag a component placed in Swing Container? 

 
130.  I want to create two instances of a class ,But when trying for creating third instance it should not 

131.  How can I swap two variables without using a third variable?Can u plz tell me the logic behind it..? 
132.  what is the interface of thread?  

 
133.  Difference between "APPLET" and "APPLICATION" 

134.  How to use C++ code in Java Program? 
 
135.  What are interfaces? or How to support multiple inheritance in Java? 
136.  Why Java is not 100% pure object oriented language? 

137.  Explain Garbage collection mechanism in Java 

138.  Can I create final executable from Java? 

 
139.  What is the meaning of "final" keyword? 

140.  Does Java have "goto"? 

 
141.  What gives java it's "write once and run anywhere" nature? 

 
142.  What is BYTE Code? 

143.  Disadvantages of Java 

 
144.  Difference: AWT, Swing 


145.  Difference: Java Beans, Servlets 


146.  Explain working of Java Virtual Machine (JVM) 

 
147.  Explain Java security model 

148.  Difference – Java, C++ 

 
149.  Meaning - Abstract classes, abstract methods 

150.  Why ArrayList is faster than Vector? 

151.  Whether private,protected method can be overloaded,overrided or not?Tell me reason? 

 
152.  Whether a Class,Method can be garbage collected or not?How? 

153.  explain the importance of "static"keyword 
154.  IBM Interview Questions in Bangalore 
 
155.  Why java does not support Multiple Inheritance?Why java is not pure Object Oriented? 

 
156.  why java does not support Multiple Inheritance?  
 
157.  how hashtable is synchronized?why hashmap is not synchronized?Can we make hashmap synchronized? 


158.  What is the difference between an object and an instance? And give me a real time example to differentiate 

 
159.  What is the basic difference between Java and .Net 
 
160.  Is java a fully object oriented programming or not? if not why? 

161.  what do you meant by private constructor? why somebody declare only private constructor.  

162.  Give example of : High severity & Low priority 
 
163.  It is a saying that static methods in JAVA programs should be minimised. What is the reason for this? 

164.  how do i upload a file from client side to server side using servlet and jsp this will happen when I 
 
165.  What is the Difference between Design Pattern and Architecture? Can any one answer for this plz.. 


166.  When we are sending the serialized array object thro the network, what is being passed ? is the value 

 
167.  write program for single objects returns two instances? 

 
168.  1)whether we can set the time implicitly for the garbage collection? 

 
169.  1)what are the other ways to create an object otherthan creating as new object? 
 
170.  1)what are the other ways to create an object otherthan creating as new object? 

171.  1) write a program that singleton objects returns two instances? 

 
172.  1) write a program that singleton objects returns two instances? 

173.  why multiple inheritance using classes is disadvantage in java  

174.  how can we take various inputs from user as int,char,string,float etc ? 
 
175.   How would you keep track of a session 

176.   How does serialization work 
 
177.   How are memory leaks possible in Java 

178.   What would happen if you say this = null 
179.   What are the differences between ArrayList and a Vector 

 
180.  What is MVC architecture 

181.  How an Hashtable can change the iterator? Can a HashMap change the iterator? 

182.  JVM is platform independent/dependent?why? 2) which one is faster in execution Array List or Array? wh 

183.   What design patterns have you used 

184.   What is heap in Java 

 
185.   Is there a separate stack for each thread in Java 

186.   Would you like to derive data from a base class 

187.   What is data encapsulation? What does it buy you 

188.   How can you do multiple inheritance in Java 

189.   What are the differences between C++ and Java 

 
190.   Differences between HashList and HashMap, Set and List 

191.   Explain the keywords - native, transient, volatile, finally 

192.   How does garbage collection work 

193.   Explain Servlet and JSP life cycle 


194.   What are STRUTS 
195.   What are the differences between EJB and Java beans 

196.   How would you declare a SingleThreaded servlet 
  
197.   Is it advisable to depend on finalize for all cleanups 

198.   What are the differences between AWT and Swing 

 
199.   What is phantom memory 

  
200.   What do you like most with Ant 

201.   How all can you instantiate final members 

202.   Can a method be static and synchronized 

 
203.   How would you pass a java integer by reference to another function 
204.   How is serialization implemented in Java 

205.   If there are 2 different versions of object streams on disk and only one object definition, how will 
206.  can we declare multiple main() methods in multiple classes.ie can we have each main method in its class 

207.   In Java, how are objects / values passed around 

208.   Will there be a performance penalty if you make a method synchronized? If so, can you make any design 

209.   What is the primary advantage of XML driven Java Beans 

 
210.   What is reflection API? How are they implemented 

211.   What is the sweep and paint algorithm 

212.   What is EJB 
 
213.   What are the disadvantages of reference counting in garbage collection 

 
214.   What are the differences between JIT and HotSpot 

215.   What are the different kinds of exceptions? How do you catch a Runtime exception 

216.   What does a static inner class mean? How is it different from any other static member 
 
217.   Does java do reference counting 

 
218.   How all can you free memory 
219.   When you use a struts framework, where would you place your business logic 

220.   What is a memory footprint? How can you specify the lower and upper limits of the RAM used by the JVM? 

221.   When you have an object passed to a method and when the object is reassigned to a different one, then 
 
222.   Do primitive types have a class representation 
 
223.   How do you declare constant values in java 

224.   How would you implement a thread pool 
 
225.   What are the primitive types in Java 
226.   Does JVM maintain a cache by itself? Does the JVM allocate objects in heap? Is this the OS heap or the 








1.  What is aggregation and composition of objects?What is the diff between monolithic and composite objec 
  
2.  what is the difference between Unicode and hash code? 

3.  what is diff between union / union all  

4.  why in case of java header file name is not required ? 

5.  what is a concrete classes? is java object class is concrete class? 
 
6.  what is differents between object and static object? 
  
7.  What is run time polymorpism and complie time polymmorpism 

 8.  Can I restrict the users of my class(say class A) to create an instance of my class not more than once(only 
  
9.  What is the use of abstract classes? How will we decide in a scenario, whether we have to use abstract 

 10.  What are the three steps to deploy EJB? 

11.  can we provide the constructor in abstact class? If yes why? what is internal mechanism of jvm 
   12.  what is uni code 
 13.  why is multiple inheritance not allowed in java? 

14.  we are writing what it actually .I mean it is Error object or else other  
15.  How the abstract classes in CMP are converted into concrete classes?  

Comments

Popular posts from this blog