Java Questions  

Posted by Rajiv Pandey in , , ,

Java, the language- is a high-level object-oriented programming language, influenced in various ways by C, C++, and Smalltalk, with ideas borrowed from other languages as well (see O'Reilly's History of Programming Languages). Its syntax was designed to be familiar to those familiar with C-descended "curly brace" languages, but with arguably stronger OO principles than those found in C++, static typing of objects, and a fairly rigid system of exceptions that require every method in the call stack to either handle exceptions or declare their ability to throw them. Garbage collection is assumed, sparing the developer from having to free memory used by obsolete objects.
One of Java's more controversial aspects--widely accepted at the time of its release but increasingly criticized today--is its incomplete object-orientation. Specifically, Java primitives such as int, char, boolean, etc. are not objects, and require a completely different treatment from the developer: as int is not a class, you cannot subclass and declare new methods on it, cannot pass it to a method that expects a generic Object, and so on. The inclusion of primitives increases Java performance, but at the arguable expense of code clarity, as anyone who's had to work with the so-called "wrapper classes" (Integer, Character, and Boolean) will attest. Java 5.0 introduces an "autoboxing" scheme to eliminate many uses of the wrapper classes, but in some ways it obscures what is really going on.

Frequently asked questions about Java...

1. What are the primitive types in Java?
2. How do you declare constant values in java?
3. Do primitive types have a class representation?
4. What does a static inner class mean? How is it different from any other static member?
5. What are the different kinds of exceptions? How do you catch a Runtime exception?
6. What are the disadvantages of reference counting in garbage collection?
7. What is the sweep and paint algorithm?
8. What is reflection API? How are they implemented?
9. What is the primary advantage of XML driven Java Beans?
10. In Java,how are objects/values passed around?
11. What are the differences between AWT and Swing?
12. What is phantom memory?
13. What are the differences between EJB and Java beans?
14. What are STRUTS?
15. How can you do multiple inheritance in Java?
16. What is data encapsulation? What does it buy you?
17. What are the differences between ArrayList and a Vector?
18. How are memory leaks possible in Java?
19. why multiple inheritance using classes is disadvantage in java?
20. What is the basic difference between Java and .Net?
21. What is the difference between an object and an instance? And give me a real time example to differ?
22. why java does not support Multiple Inheritance?
23. Why java does not support Multiple Inheritance?Why java is not pure Object Oriented?
24. Whether a Class,Method can be garbage collected or not?How?
25. Whether private,protected method can be overloaded,overrided or not?Tell me reason?
26. Why ArrayList is faster than Vector?
27. Meaning - Abstract classes, abstract methods?
28. please tell me about oops?
29. what is main difference between jsp and servlets?
30. what is jdbc?
31. what is difference between procedure and functions?
32. What is run time polymorpism and complie time polymmorpism?
33. what is differents between object and static object?
34. what is a concrete classes? is java object class is concrete class?
35. What are java archives?
36. what is the difference between call by value, call by reference, call by address?
37. Can an exception be rethrown?
38. Which class is the immediate superclass of the Container class?
39. If a method is declared as protected, where may the method be accessed?
40. What is the return type of a program's main() method?
41. What class of exceptions are generated by the Java run-time system?
42. What is the difference between a field variable and a local variable?
43. Under what conditions is an object's finalize() method invoked by the garbagecollector?
44. What is a void return type?
45. What is the purpose of the enableEvents() method?
46. What is the purpose of garbage collection?
47. What restrictions are placed on method overriding?
48. What happens if an exception is not caught?
49. How can a dead thread be restarted?
50. What methods are used to get and set the text label displayed by a Button object?


This entry was posted on Sunday, October 28, 2007 at Sunday, October 28, 2007 and is filed under , , , . You can follow any responses to this entry through the comments feed .

0 comments

Post a Comment