Tcs Java Interview Questions
1. Explain the meaning of Abstract classes, abstract methods ?
Ans:-Abstract class is a class which contain (may be )both concrete method & abstract methods.but abstract methods contain no body.
Ans:-Abstract class is a class which contain (may be )both concrete method & abstract methods.but abstract methods contain no body.
2. What is the difference between Java and C++
ans:- everything present in java whinin class .but in c++ main method is outside of class.there is no operator overloading ,template, in java .
ans:- everything present in java whinin class .but in c++ main method is outside of class.there is no operator overloading ,template, in java .
3. What is the difference between == and equals method
Ans:- we over ride equals method & provide own functionality.
Ans:- we over ride equals method & provide own functionality.
4. Explain Java security model
there is 4 phase security model,
there is 4 phase security model,
- classloader
- classfile verifier,
- jvm
- java security manager& java Api.
5. Explain working of Java Virtual Machine (JVM)
Ans:-it is responsible for loading & executing our class.
Ans:-it is responsible for loading & executing our class.
6. What is the difference Java Beans and Servlets
Ans:-java bean is componet.servlet is appilication
7. What is the difference between AWT and Swing
Ans:-awt use compnet of o.s. but swing use its own componet.thats way awt is heavy weight process & swing is light process
8. What are the disadvantages of Java
Ans:execution speed is slow.
9. What is BYTE Code ?
Ans:-in java each instruction take one byte.
10. What gives java it's "write once and run anywhere" nature?
Ans:-because compile code of one o.s is execute in another o.s
11. Does Java have "goto"?
Ans:-no
12. What is the meaning of "final" keyword?
Ans:-we can not alter the value.
13. Can I create final executable from Java?
Ans:no
14. Explain Garbage collection mechanism in Java
Ans:-it is done by two ways by reference count & trace a graph of object reference
15. Why Java is not 100% pure object oriented language?
Ans:-because we can access static member by class name.
16. What are interfaces? or How to support multiple inhertance in Java?
Ans:-reference contain only abstract fun. by interface we can support m.i concept.
17. How to use C++ code in Java Program?
Ans:-by native method.
18. What is the difference between "APPLET" and "APPLICATION
Ans:-applet run over browser But application on command promt
No comments:
Post a Comment