Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

some java interview Questions

 
Ranch Hand
Posts: 144
Redhat Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I thank Roshita for the collection...
Please try to answer these Questions for the benefit of all and put em up in a proper place on the net for all
I will be contributing my 2 paisa As soon as I get some time .

Regards
Sunil
1. What is the difference between an Abstract class and Interface ?
2. What is user defined exception ?
3. What do you know about the garbage collector ?
4. What is the difference between C++ & Java ?
5. Explain RMI Architecture?
6. How do you communicate in between Applets & Servlets ?
7. What is the use of Servlets ?
8. What is JDBC? How do you connect to the Database ?
9. In an HTML form I have a Button which makes us to open another page in 15 seconds. How will do you that ?
10. What is the difference between Process and Threads ?
11. What is the difference between RMI & Corba ?
12. What are the services in RMI ?
13. How will you initialize an Applet ?
14. What is the order of method invocation in an Applet ?
15. When is update method called ?
16. How will you pass values from HTML page to the Servlet ?
17. Have you ever used HashTable and Dictionary ?
18. How will you communicate between two Applets ?
19. What are statements in JAVA ?
20. What is JAR file ?
21. What is JNI ?
22. What is the base class for all swing components ?
23. What is JFC ?
24. What is Difference between AWT and Swing ?
25. Considering notepad/IE or any other thing as process, What will happen if you start notepad or IE 3 times? Where 3 processes are started or 3 threads are started ?
26. How does thread synchronization occurs inside a monitor ?
27. How will you call an Applet using a Java Script function ?
28. Is there any tag in HTML to upload and download files ?
29. Why do you Canvas ?
30. How can you push data from an Applet to Servlet ?
31. What are 4 drivers available in JDBC ?
32. How you can know about drivers and database information ?
33. If you are truncated using JDBC, How can you know ..that how much data is truncated ?
34. And What situation , each of the 4 drivers used ?
35. How will you perform transaction using JDBC ?
36. In RMI, server object first loaded into the memory and then the stub reference is sent to the client ? or whether a stub reference is directly sent to the client ?
37. Suppose server object is not loaded into the memory, and the client request for it , what will happen?
38. What is serialization ?
39. Can you load the server object dynamically? If so, what are the major 3 steps involved in it ?
40. What is difference RMI registry and OSAgent ?
41. To a server method, the client wants to send a value 20, with this value exceeds to 20,. a message should be sent to the client ? What will you do for achieving for this ?
42. What are the benefits of Swing over AWT ?
43. Where the CardLayout is used ?
44. What is the Layout for ToolBar ?
45. What is the difference between Grid and GridbagLayout ?
46. How will you add panel to a Frame ?
47. What is the corresponding Layout for Card in Swing ?
48. What is light weight component ?
49. Can you run the product development on all operating systems ?
50. What is the webserver used for running the Servlets ?
51. What is Servlet API used for connecting database ?
52. What is bean ? Where it can be used ?
53. What is difference in between Java Class and Bean ?
54. Can we send object using Sockets ?
55. What is the RMI and Socket ?
56. How to communicate 2 threads each other ?
57. What are the files generated after using IDL to Java Compilet ?
58. What is the protocol used by server and client ?
59. Can I modify an object in CORBA ?
60. What is the functionality stubs and skeletons ?
61. What is the mapping mechanism used by Java to identify IDL language ?
62. Diff between Application and Applet ?
63. What is serializable Interface ?
64. What is the difference between CGI and Servlet ?
65. What is the use of Interface ?
66. Why Java is not fully objective oriented ?
67. Why does not support multiple Inheritance ?
68. What it the root class for all Java classes ?
69. What is polymorphism ?
70. Suppose If we have variable ' I ' in run method, If I can create one or more thread each thread will occupy a separate copy or same variable will be shared ?
71. In servlets, we are having a web page that is invoking servlets username and password ? which is checked in the database ? Suppose the second page also If we want to verify the same information whether it will connect to the database or it will be used previous information?
72. What are virtual functions ?
73. Write down how will you create a binary Tree ?
74. What are the traverses in Binary Tree ?
75. Write a program for recursive Traverse ?
76. What are session variable in Servlets ?
77. What is client server computing ?
78. What is Constructor and Virtual function? Can we call Virtual function in a constructor ?
79. Why we use OOPS concepts? What is its advantage ?
80. What is the middleware ? What is the functionality of Webserver ?
81. Why Java is not 100 % pure OOPS ? ( EcomServer )
82. When we will use an Interface and Abstract class ?
83. What is an RMI?
84. How will you pass parameters in RMI ? Why u serialize?
85. What is the exact difference in between Unicast and Multicast object ? Where we will use ?
86. What is the main functionality of the Remote Reference Layer ?
87. How do you download stubs from a Remote place ?
88. What is the difference in between C++ and Java ? can u explain in detail ?
89. I want to store more than 10 objects in a remote server ? Which methodology will follow ?
90. What is the main functionality of the Prepared Statement ?
91. What is meant by static query and dynamic query ?
92. What are the Normalization Rules ? Define the Normalization ?
93. What is meant by Servlet? What are the parameters of the service method ?
94. What is meant by Session ? Tell me something about HTTPSession Class ?
95. How do you invoke a Servlet? What is the difference in between doPost and doGet methods ?
96. What is the difference in between the HTTPServlet and Generic Servlet ? Explain their methods ? Tell me their parameter names also ?
97. Have you used threads in Servlet ?
98. Write a program on RMI and JDBC using StoredProcedure ?
99. How do you sing an Applet ?
100. In a Container there are 5 components. I want to display the all the components names, how will you do that one ?
101. Why there are some null interface in java ? What does it mean ? Give me some null interfaces in JAVA ?
102. Tell me the latest versions in JAVA related areas ?
103. What is meant by class loader ? How many types are there? When will we use them ?
104. How do you load an Image in a Servlet ?
105. What is meant by flickering ?
106. What is meant by distributed Application ? Why we are using that in our applications ?
107. What is the functionality of the stub ?
108. Have you used any version control ?
109. What is the latest version of JDBC ? What are the new features are added in that ?
110. Explain 2 tier and 3 -tier Architecture ?
111. What is the role of the webserver ?
112. How have you done validation of the fields in your project ?
113. What is the main difficulties that you are faced in your project ?
114. What is meant by cookies ? Explain ?
[ February 02, 2003: Message edited by: Marilyn de Queiroz ]
 
Ranch Hand
Posts: 250
Python Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi ranchers,
I was looking for some interview questions and found a lot of them; problem was -- there were no answers (to most of them). So I said why not start answering and put them at one place for others to comment, improve and help others. After jumping into this I take on this..hope others will emulate..
1.What is the diffrence between an Abstract class and Interface?
[Just performing a search in programmer Certification study forum will help you get a dozen or more threads to savor, I find the following worth a glance]
  • Abstract classes may have some executable methods and methods left unimplemented. Interfaces contain no implementation code.
  • A class can implement any number of interfaces, but subclass at most one abstract class.
  • An abstract class can have nonabstract methods. All methods of an interface are abstract.
  • An abstract class can have instance variables. An interface cannot.
  • An abstract class can define constructor. An interface cannot.
  • An abstract class can have any visibility: public, protected, private or none (package). An interface's visibility must be public or none (package).
  • An abstract class inherits from Object and includes methods such as clone() and equals().


  • 2. What is a user defined exception?
    User-defined exceptions may be implemented by
  • defining a class to respond to the exception and
  • embedding a throw statement in the try block where the exception can occur or declaring that the method throws the exception (to another method where it is handled).

  • The developer can define a new exception by deriving it from the Exception class as follows:
    The throw statement is used to signal the occurance of the exception within a try block. Often, exceptions are instantiated in the same statement in which they are thrown using the syntax.
    To handle the exception within the method where it is thrown, a catch statement that handles MyException, must follow the try block. If the developer does not want to handle the exception in the method itself, the method must pass the exception using the syntax:

    3. What do you know about the garbage collector?
    Garbage collector is a runtime component of Java which sits on top of the heap: memory area from which Java objects are created and periodically scans it for objects which are eligible to be reclaimed when there are no references to these objects in the program. There is simply no way to force garbage collection, but you can suggest your intention of getting the object garbage collecetd to Java Virtual Machine by calling
    4. What is the difference between C++ & Java?
    Well as Bjarne Stroustrup says "..despite the syntactic similarities, C++ and Java are very different languages. In many ways, Java seems closer to Smalltalk than to C++..". Here are few I discovered:
  • Java is multithreaded
  • Java has no pointers
  • Java has automatic memory management (garbage collection)
  • Java is platform independent (Stroustrup may differ by saying "Java is a platform" )
  • Java has built-in support for comment documentation
  • Java has no operator overloading
  • Java doesn’t provide multiple inheritance
  • There are no destructors in Java

  • An excellent resource is here.
    More to follow..
    [ February 01, 2003: Message edited by: Debashish Chakrabarty ]
    [ February 06, 2003: Message edited by: Debashish Chakrabarty ]
     
    Debashish Chakrabarty
    Ranch Hand
    Posts: 250
    Python Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Here comes the second installment
    5. Explain RMI Architecture?
    RMI uses a layered architecture, each of the layers could be enhanced or replaced without affecting the rest of the system. The details of layers can be summarised as follows:
  • Application Layer: The client and server program
  • Stub & Skeleton Layer: Intercepts method calls made by the client/redirects these calls to a remote RMI service.
  • Remote Reference Layer: Understands how to interpret and manage references made from clients to the remote service objects.
  • Transport layer: Based on TCP/IP connections between machines in a network. It provides basic connectivity, as well as some firewall penetration strategies.


  • 6. How do you communicate in between Applets & Servlets ?
    We can use the java.net.URLConnection and java.net.URL classes to open a standard HTTP connection and "tunnel" to the web server. The server then passes this information to the servlet in the normal way. Basically, the applet pretends to be a web browser, and the servlet doesn't know the difference. As far as the servlet is concerned, the applet is just another HTTP client.
    7. What is the use of Servlets ?
    Servlets may be used at different levels on a distributed framework. The following are some examples of servlet usage:
  • To accept form input and generate HTML Web pages dynamically.
  • As part of middle tiers in enterprise networks by connecting to SQL databases via JDBC.
  • In conjunction with applets to provide a high degree of interactivity and dynamic Web content generation.
  • For collaborative applications such as online conferencing.
  • A community of servlets could act as active agents which share data with each other.
  • Servlets could be used for balancing load among servers which mirror the same content.
  • Protocol support is one of the most viable uses for servlets. For example, a file service can start with NFS and move on to as many protocols as desired; the transfer between the protocols would be made transparent by servlets. Servlets could be used for tunneling over HTTP to provide chat, newsgroup or other file server functions.


  • 8. What is JDBC? How do you connect to the Database ?
    JDBC stands for Java Database Connectivity. Its a set of programming APIs which allow easy connection to a wide range of databases through Java programs.
    To connect to the database we will need to load the database driver and then request a connection as below:

    9. In an HTML form I have a Button which makes us to open another page in 15 seconds. How will do you that ?
    [This is infact a javascript question.]
    We can use the setTimeout method to use delay time and then the window.open method to open the new page. The script could be something like the following. We could call the doPopup() method on the click event of the button placed on our webpage.

    10. What is the difference between Process and Threads ?
    See this https://coderanch.com/t/370228/java/java/here-some-interview-questions-asked
    More to follow...
    [ February 05, 2003: Message edited by: Debashish Chakrabarty ]
     
    Debashish Chakrabarty
    Ranch Hand
    Posts: 250
    Python Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Here is the third instalment:
    11. What is the difference between RMI & Corba ?
    The most significant difference between RMI and CORBA is that CORBA was made specifically for interoperability across programming languages. That is CORBA fosters the notion that programs can be built to interact in multiple languages. The server could be written in C++, the business logic in Python, and the front-end written in COBOL in theory. RMI, on the other hand is a total Java solution, the interfaces, the implementations and the clients--all are written in Java.
    RMI allows dynamic loading of classes at runtime. In a multi-language CORBA environment, dynamic class loading is not possible. The important advantage to dynamic class loading is that it allows arguments to be passed in remote invocations that are subtypes of the declared types. In CORBA, all types have to be known in advance. RMI (as well as RMI/IIOP) provides support for polymorphic parameter passing, whereas strict CORBA does not. CORBA does have support for multiple languages which is good for some applications, but RMI has the advantage of being dynamic, which is good for other applications.
    12. What are the services in RMI ?
    An RMI "service" could well be any Java method that can be invoked remotely. The other service is the JRMP RMI naming service which is a lookup service.
    13. How will you initialize an Applet ?
    Write my initialization code in the applets init method or applet constructor.
    14. What is the order of method invocation in an Applet ?
  • public void init() : Initialization method called once by browser.
  • public void start() : Method called after init() and contains code to start processing. If the user leaves the page and returns without killing the current browser session, the start () method is called without being preceded by init ().
  • public void stop() : Stops all processing started by start (). Done if user moves off page.
  • public void destroy() : Called if current browser session is being terminated. Frees all resources used by applet.


  • 15. When is update method called ?
    Whenever a screen needs redrawing (e.g., upon creation, resizing, validating) the update method is called. By default, the update method clears the screen and then calls the paint method, which normally contains all the drawing code.
    16. How will you pass values from HTML page to the Servlet ?
    First we put the values to be passed inside a HTML form and then call the servlet in the form action. To catch the form fields values we simply call the getParameter method of the HttpServletRequest, supplying the parameter name as an argument. The return value is a String corresponding to the first occurrence of that parameter name. An empty String is returned if the parameter exists but has no value, and null is returned if there was no such parameter.
    If the parameter could potentially have more than one value we should call getParameterValues instead of getParameter. This returns an array of strings. To get a full list of parameters we can use getParameterNames which returns an Enumeration, each entry of which can be cast to a String and used in a getParameter call.
    18. How will you communicate between two Applets ?
    The simplest method is to use the static variables of a shared class since there's only one instance of the class and hence only one copy of its static variables. A slightly more reliable method relies on the fact that all the applets on a given page share the same AppletContext. We obtain this applet context as follows:

    AppletContext provides applets with methods such as getApplet(name), getApplets(),getAudioClip, getImage, showDocument and showStatus().
    19. What are statements in JAVA ?
    [From the Java tutorial]
    Statements are equivalent to sentences in natural languages. A statement forms a complete unit of execution. The following types of expressions can be made into a statement by terminating the expression with a semicolon ( :
  • Assignment expressions
  • Any use of ++ or --
  • Method calls
  • Object creation expressions

  • These kinds of statements are called expression statements.
    In addition to these kinds of expression statements, there are two other kinds of statements. A declaration statement declares a variable. A control flow statement regulates the order in which statements get executed. The for loop and the if statement are both examples of control flow statements.
    20. What is JAR file ?
    JavaARchive files are a big glob of Java classes, images, audio, etc., compressed to make one simple, smaller file to ease Applet downloading. Normally when a browser encounters an applet, it goes and downloads all the files, images, audio, used by the Applet separately. This can lead to slower downloads.
    21. What is JNI ?
    JNI is an acronym of Java Native Interface. Using JNI we can call functions which are written in other languages from Java. Following are its advantages and disadvantages:
    Advantages:
  • You want to use your existing library which was previously written in other language.
  • You want to call Windows API function.
  • For the sake of execution speed.
  • You want to call API function of some server product which is in c or c++ from java client.

  • Disadvantages:
  • You can’t say write once run anywhere.
  • Difficult to debug runtime error in native code.
  • Potential security risk.
  • You can’t call it from Applet.


  • 22. What is the base class for all swing components ?
    JComponent (except top-level containers)
    23. What is JFC ?
    Java Foundation Classes include:
  • Standard AWT 1.1
  • Accessibility interface
  • Lightweight components: which are user interface components that do not subclass an existing AWT interface element. They do not use native interface elements as provided by the underlying windowing system. This means that they are less limiting than standard AWT components.
  • Java look and feel
  • Support for native look and feel
  • Services such as Java2D and Drag and Drop


  • 24. What is Difference between AWT and Swing ?
    Swing provides a richer set of components than AWT. They are 100% Java-based. AWT on the other hand was developed with the mind set that if a component or capability of a component weren’t available on one platform, it wouldn’t be available on any platform. Due to the peer-based nature of AWT, what might work on one implementation might not work on another, as the peer-integration might not be as robust. There are a few other advantages to Swing over AWT:
  • Swing provides both additional components and added functionality to AWT-replacement components
  • Swing components can change their appearance based on the current "look and feel" library that's being used.
  • Swing components follow the Model-View-Controller (MVC) paradigm, and thus can provide a much more flexible UI.
  • Swing provides "extras" for components, such as:
  • Icons on many components
  • Decorative borders for components
  • Tool tips for components
  • Swing components are lightweight (less resource intensive than AWT)
  • Swing provides built-in double buffering
  • Swing provides paint debugging support for when you build your own components


  • Swing also has a few disadvantages:
  • It requires Java 2 or a separate JAR file
  • If you're not very careful when programming, it can be slower than AWT (all components are drawn)
  • Swing components that look like native components might not act exactly like native components


  • 25. Considering notepad/IE or any other thing as process, What will happen if you start notepad or IE 3 times? Where 3 processes are started or 3 threads are started ?
    3 separate processes are started.
    More to follow
    [ February 05, 2003: Message edited by: Debashish Chakrabarty ]
     
    Ranch Hand
    Posts: 2545
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Thanks for the time and efforts!
    I foresee there will be Sun Certified Java Interviewer someday.
     
    Debashish Chakrabarty
    Ranch Hand
    Posts: 250
    Python Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Thanks Don
    I set myself a target of answering atleast 5 questions everyday..I missed for few days as I was on official trip..so it may take quite a while to answer all these questions..hope others will assist me..
    Infact I expect comments, corrections and opinions on (all) the answer. I am hardly getting any here unlike the previous thread . While I search the answers and put them here only fellow ranchers can help me know if the answers are correct and good enough.

    Regards,
    [ February 06, 2003: Message edited by: Debashish Chakrabarty ]
     
    Ranch Hand
    Posts: 2596
    Android Firefox Browser Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Excellent work Debashish, I hope someone puts a link to this thread in the Job Discussion forum. Just a small correction -

    Java has no operator overloading.


    Instead
    "Java has no user defined operator overloading."
    would be more accurate; as Java overloads + operator for string concatenation.
    - Manish
     
    Debashish Chakrabarty
    Ranch Hand
    Posts: 250
    Python Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Thanks Manish. Good to see some movement in this thread Here comes another instalment
    26. How does thread synchronization occurs inside a monitor ?
    [Question not too clear to me ]
    The JVM uses locks in conjunction with monitors. A monitor is basically a guardian in that it watches over a sequence of code, making sure only one thread at a time executes the code. Each monitor is associated with an object reference. When a thread arrives at the first instruction in a block of code it must obtain a lock on the referenced object. The thread is not allowed to execute the code until it obtains the lock. Once it has obtained the lock, the thread enters the block of protected code. When the thread leaves the block, no matter how it leaves the block, it releases the lock on the associated object.
    27. How will you call an Applet using a Java Script function ?
    Like this:
    Does not work with IE though
    28. Is there any tag in HTML to upload and download files ?
    I am not aware of HTML tags to help me upload a file, we would certianly need some server side scripting to process that. We can certainly use HTML to provide a download hyperlink as follows:
    [What do you think of this answer ranchers?]
    29. Why do you Canvas ?
    The Canvas class of java.awt is used to provide custom drawing and event handling. It provides a general GUI component for drawing images and text on the screen. It does not support any drawing methods of its own, but provides access to a Graphics object through its paint() method. The paint() method is invoked upon the creation and update of a canvas so that the Graphics object associated with a Canvas object can be updated.
    30. How can you push data from an Applet to Servlet ?
    By using the java.net packages to create a direct network connection; or by invoking a remote method using Java's remote method invocation (RMI) interface or by using CORBA. (Any rancher would like to add details here?)
    31. What are 4 drivers available in JDBC ?
    34. And What situation , each of the 4 drivers used ?

  • Type 1: JDBC-ODBC Bridge

  • The type 1 driver, JDBC-ODBC Bridge, translates all JDBC calls into ODBC (Open DataBase Connectivity) calls and sends them to the ODBC driver. As such, the ODBC driver, as well as, in many cases, the client database code, must be present on the client machine. May be used when an ODBC driver has already been installed on client machine and performance is not an issue.
  • Type 2: Native-API/partly Java driver

  • JDBC driver type 2 -- the native-API/partly Java driver -- converts JDBC calls into database-specific calls for databases such as SQL Server, Informix, Oracle, or Sybase. The type 2 driver communicates directly with the database server; therefore it requires that some binary code be present on the client machine. Can be used when application is not for internet.
  • Type 3: Net-protocol/all-Java driver

  • JDBC driver type 3 -- the net-protocol/all-Java driver -- follows a three-tiered approach whereby the JDBC database requests are passed through the network to the middle-tier server. The middle-tier server then translates the request (directly or indirectly) to the database-specific native-connectivity interface to further the request to the database server. If the middle-tier server is written in Java, it can use a type 1 or type 2 JDBC driver to do this.Type 3 drivers are best suited for environments that need to provide connectivity to a variety of DBMS servers and heterogeneous databases and that require significantly high levels of concurrently connected users where performance and scalability are major concerns.
  • Type 4: Native-protocol/all-Java driver

  • The native-protocol/all-Java driver (JDBC driver type 4) converts JDBC calls into the vendor-specific database management system (DBMS) protocol so that client applications can communicate directly with the database server. Level 4 drivers are completely implemented in Java to achieve platform independence and eliminate deployment administration issues. Useful for Internet-related applications.

    32. How you can know about drivers and database information?By using the methods of java.sql.DatabaseMetaData interface.
    [ February 07, 2003: Message edited by: Debashish Chakrabarty ]
     
    Debashish Chakrabarty
    Ranch Hand
    Posts: 250
    Python Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    33. If you are truncated using JDBC, How can you know ..that how much data is truncated ?
    This can be known using the class DataTruncation. DataTruncation is an exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates (meaning that less information was read or written than requested) a data value. So all we should do is write our code using the getDataSize() and getTransferSize() methods of this class in our catch block trapping this SQLException. The getDataSize() returns the number of bytes of data that should have been transferred while the getTransferSize() method returns the number of bytes of data actually transferred. The SQLstate for a DataTruncation is 01004.
    35. How will you perform transaction using JDBC ?
    A good, detailed answer is here http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html. Another good resource is here http://java.sun.com/docs/books/tutorial/jdbc/basics/transactions.html.
    36. In RMI, server object first loaded into the memory and then the stub reference is sent to the client ? or whether a stub reference is directly sent to the client ?
    request ranchers to answer this question..
    37. Suppose server object is not loaded into the memory, and the client request for it , what will happen?
    request ranchers to answer this question..
    38. What is serialization ?
    Quite simply, object serialization provides a program the ability to read or write a whole object to and from a raw byte stream. It allows Java objects and primitives to be encoded into a byte stream suitable for streaming to some type of network or to a file-system, or more generally, to a transmission medium or storage facility. A seralizable object must implement the Serilizable interface. We use ObjectOutputStream to write this object to a stream and ObjectInputStream to read it from the stream.
    39. Can you load the server object dynamically? If so, what are the major 3 steps involved in it ?
    request ranchers to answer this question..
    40. What is the difference RMI registry and OSAgent ?
    request ranchers to answer this question..
    41. To a server method, the client wants to send a value 20, with this value exceeds to 20,. a message should be sent to the client ? What will you do for achieving for this ?
    I hope this question is not in terms of RMI. We can use a Servlet or JSP for this, call it using an HTML (or a Servlet or JSP for that matter) and pass the value through a HTML form. We check this request parameter and send a reponse back to browser if value of input parameter exceeds 20.
    42. What are the benefits of Swing over AWT ?
    See answer to Q.24
    43. Where the CardLayout is used ?
    CardLayout manages two or more components that share the same display space. It lets you use one container (usually a panel) to display one out of many possible component children (like flipping cards on a table). A program can use this layout to show a different child component to different users. For example, the interface shown to an administrator might have additional functionality from the interface shown to a regular user. With card layout, our program can show the appropriate interface depending on the type of user using the program. Another typical use of card layout would be to let end user toggle among different displays and choose the one they prefer. In this case, the program must provide a GUI for the user to make the selection.
    44. What is the Layout for ToolBar ?
    I did not find any Toolbar class in AWT..ranchers hit me if I am wrong ..
     
    Greenhorn
    Posts: 4
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Hi ,
    Can u pls continue this thread. This is very useful for all. :roll:
     
    Greenhorn
    Posts: 2
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Very Good thread....
    will try to contribute to the remaining..questions.
    See ya guys soon
     
    author
    Posts: 3252
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Excellent answers Debashish Chakrabarty. I would like, if I may, give some answers that are different but perhaps no less valid.
    1.What is the diffrence between an Abstract class and Interface?
    A Java interface is just that, a purely abstract method interface with no implementation component. An abstract class provides not just an interface, it also provides a (partial) implementation.
    Java supports multiple interface inheritance, but only single implementation inheritance.
    Everything else follows from these two.
    3. What do you know about the garbage collector?
    In addition to what has been written above: all you really know about the garbage collector is that it will run to clear unreferenced objects from the heap before an OutOfMemoryError is thrown.
    6. How do you communicate in between Applets & Servlets ?
    An applet may use the URL class to submit HTTP requests to invoke a servlet. It's as simple as that. This is not tunneling. Tunneling would be, for instance, used to allow the applet to make RMI calls to server-side Java classes (RMI over HTTP), or to allow a JDBC connection over HTTP.
    7. What is the use of Servlets ?
    They are components to receive and process requests in some request/response protocol.
    Most often, they are used to receive and process HTTP requests (HttpServlet). Note that (1) this includes JSPs, as JSPs are just servlets, and (2) this covers lots of protocols that use HTTP as a transport or that can be tunneled over HTTP, such as RMI, JDBC, SOAP, XML-RPC, WebDAV, and so forth.
    8. What is JDBC? How do you connect to the Database ?
    JDBC is a set of APIs to connect to any row-based data source, usually relational database systems.
    I would submit that these days, DriverManager.getConnection() is not the best answer you can give to the question "how do you connect to the Database". The preferred way is to use a DataSource wherever possible:
    The actual data source is set up by/using the application server.
    10. What is the difference between Process and Threads ?
    The difference between them is mainly the level of isolation; in particular, each process gets its own memory space, where threads belonging to the same process share each other's memory.
    12. What are the services in RMI ?
    This question is very ambiguous. In addition to the answer given above, you could perhaps say that the distributed garbage collector (DGC) is a service, provided by the RMI implementation to the application software.
    Briefly, the DGC keeps track of the number of remote references to a given exported (RMI-callable) object that exist. When no more remote references exist, the DGC can notify the object using the Unreferenced interface. It will also start cleaning up its own internal bookkeeping for that object since no-one will be able to call that object anymore.
    20. What is JAR file ?
    JARs are not always compressed; for software that is not downloaded, but simply installed locally, an uncompressed JAR can be accessed a little faster. The jars in your JRE are a point in case.
    26. How does thread synchronization occurs inside a monitor ?
    The only thing you could add to the explanation above is that a thread can acquire a monitor lock multiple times, i.e. it is OK to call further methods that synchronize on the same object. The monitor is released only when you've released all the locks.
    28. Is there any tag in HTML to upload and download files ?
    An <input type="file"> in an HTML form will allow file upload. A simple anchor tag will allow file download -- based on the file type (extension and/or MIME type), the browser will decide whether the linked-to contents needs to be displayed in a browser window, launched in an external application, or whether they can only be saved to disk.
    30. How can you push data from an Applet to Servlet ?
    In practice, a servlet receives only HTTP request, so the answer is to submit a HTTP request with the data in the URL (GET) or the request body (POST), e.g. using java.net.URL.
    More later,
    - Peter
     
    Greenhorn
    Posts: 20
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    109. Latest version of JDBC and new features.
    The latest version of JDBC is JDBC 3.0 . Some of the new features that are included in it are :
    Support for SavePoints
    Improved Support CLOB and BLOB data types
    Ability to open multiple Resultsets
    Addition of Boolean Data type
    Retrieval of auto-generated keys
    i'll try to answer more questions when i get time..iam preparing for an interview myself

    BTW Debashish Excellent job..it's posters like you that make this forum worth visiting
     
    sunil choudhary
    Ranch Hand
    Posts: 144
    Redhat Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Thank you Deb and Peter
    Deb you have really done a commdendable job.
    thanks a lot.
    Sunil Choudhary
     
    Peter den Haan
    author
    Posts: 3252
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator

    Originally posted by Debashish Chakrabarty:
    33. If you are truncated using JDBC, How can you know ..that how much data is truncated ?
    This can be known using the class DataTruncation. [...] So all we should do is write our code [...] in our catch block trapping this SQLException.

    Ah. But this is actually not true at all.
    You've just fallen into one of the biggest traps in the JDBC API. DataTruncation looks like an exception, smells like an exception, but actually is not really an exception. It's a subclass of SQLWarning. SQLWarning objects are not normally thrown, so trying to catch them is a fruitless exercise. After executing a statement, you can retrieve any warnings that have been generated using ResultSet.getWarnings(), Statement.getWarnings() or Connection.getWarnings(). These methods will return the first warning (or null); you can access subsequent warnings (if any) by calling SQLWarning.getNextWarning().
    36. In RMI, server object first loaded into the memory and then the stub reference is sent to the client ? or whether a stub reference is directly sent to the client ?
    In the simplest case, you make a Remote object available for remote calls using RemoteStub UnicastRemoteObject.exportObject(Remote). So usually you first have to create the Remote object and only then can get the stub to send to the client.
    37. Suppose server object is not loaded into the memory, and the client request for it , what will happen?
    I guess this is where they want to hear about RMI Activation, where rmid will receive the RMI call and create the Remote object on-demand. Basically, Activatable.register() will return a stub that knows how to create your object when it receives a call.
    40. What is the difference RMI registry and OSAgent ?
    OSAgent, isn't that the VisiBroker CORBA naming service? It may be that OSAgent is to CORBA objects what the RMI registry is to RMI objects, but take that with a pinch of salt, I don't really have a clue. I know very little about CORBA.
    41. To a server method, the client wants to send a value 20, with this value exceeds to 20,. a message should be sent to the client ? What will you do for achieving for this ?
    I don't see the point of this question. If it's an RMI question, you can either throw an exception or return some kind of code -- like in any ordinary Java method, really. RMI was created to give you Java method call semantics for remote objects. There's no difference.
    - Peter
    [ April 28, 2003: Message edited by: Peter den Haan ]
     
    Peter den Haan
    author
    Posts: 3252
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    I'll kick in on a few more, but skip the ones I find boring
    49. Can you run the product development on all operating systems ?
    Well, that depends, doesn't it? On all OSs that have a JVM of the right version, and only insofar as you did not build any OS-specific assumptions in your product, and only if you actually debugged your application on that OS.
    Java: write once, debug everywhere.
    Seriously, there are platform-specific bugs, quirks and peculiarities which can cause plenty of headaches for some types of applications.
    50. What is the webserver used for running the Servlets ?
    I don't understand this question. Webservers don't run servlets. Webservers may have a link to a servlet engine which runs the servlets. Or, conversely, many servlet engines implement full webserver functionality since they're 90% of the way there anyway
    51. What is Servlet API used for connecting database ?
    The Servlet API cannot be used to connect to a database. But every application server worth its salt supports the JDBC 2.0 and JNDI APIs and allows you to set up DataSources and bind them into the JNDI tree.
    52. What is bean ? Where it can be used ?
    A JavaBean is basically a Java class which satisfies a few simple rules (it must have a no-arg constructor, properties have getters and setters; actually, you can get around the last rule by supplying a BeanInfo object for your bean). JavaBeans were originally conceived for graphical application builder tools, but that emphasis has shifted considerably and they're now used almost everywhere.
    53. What is difference in between Java Class and Bean ?
    The rules mentioned above. A Bean can have associated support classes: a BeanInfo class providing information about the bean, its properties and its events, and also property editors and a graphical customizer.
    54. Can we send object using Sockets ?
    Sure. Why not? Socket I/O is exposed at streams. We can send/receive objects to/from streams using serialization.
    55. What is the RMI and Socket ?
    I don't understand the question. RMI is built on top of the Java socket API. UnicastRemoteObject creates ServerSockets for exported Remote objects; the client-side stub uses Sockets to connect to these ServerSockets.
    56. How to communicate 2 threads each other ?
    The only answer I can give is: synchronized access to shared state. That's a very general answer to an equally general question.
    60. What is the functionality stubs and skeletons ?
    The stub is a client-side class. It implements whatever interface your Remote object implements, but its methods merely marshal the method call information over the wire.
    The skeleton is a server-side class. It receives the marshalled method calls that the stub generated, and turns them into method calls to the actual Remote object that you wrote.
    The 1.2 JRMP stub protocol did away with the need for skeletons. It seems to me that the Proxy class introduced in Java 1.3 could replace RMI stubs. I'm not sure why this hasn't happened yet -- probably I'm missing something. It would be nice to use RMI without bothering with rmic though.
    - Peter
     
    Shadab Khan
    Greenhorn
    Posts: 20
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    101. Why there are some null interface in java ? What does it mean ? Give me some null interfaces in JAVA ?
    Null interfaces act as markers..they just tell the compiler that the objects of this class need to be treated differently..some marker interfaces are : Serializable, Remote, Cloneable

    93. What is meant by Servlet? What are the parameters of the service method ?
    A Servlet is a java class that extends the request-response model of an webserver. it recieves request from a client performs any neccessary operations..builds a response object and sends it back to the client.
    The Parameteres of the service method are HttpServletRequest and HttpServletResponse objects


    114. What is meant by cookies ? Explain ?
    A Cookie is a small bit of textual information send by an website to the browser with some information about the user. The browser sends it back to the webserver upon subsequent visits of the user to that particular website.
    96. What is the difference in between the HTTPServlet and Generic Servlet ? Explain
    A GenericServlet is a protocol independent servlet. The HttpServlet class extends the GenericServlet..it is meant specifically for the HTTP protocol
     
    Ranch Hand
    Posts: 515
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator

    Originally posted by Shadab Khan:

    96. What is the difference in between the HTTPServlet and Generic Servlet ? Explain
    A GenericServlet is a protocol independent servlet. The HttpServlet class extends the GenericServlet..it is meant specifically for the HTTP protocol


    Actually if you could expand on this, I'd love to hear more about this question...
    [ May 02, 2003: Message edited by: Dale DeMott ]
     
    Ranch Hand
    Posts: 2378
    MySQL Database Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    113. What is the main difficulties that you are faced in your project?
    1. Skilled Java Developers are scarce though there are lots of semi-skilled/unskilled java programmers.
    2. Programmers seldom understand that coding is not the only major issue of software development.
    3. Junior programmers don't follow coding and naming conventions.
    4. Programmers don't like to document their coding and designs.
    5. Programmers are generally non-communicative.
    6. Programmers generally can't meet schedules or dead-lines.
    7. Project manager and programmers have gap between them to understand a certain idea/topic.
    8. Skilled or senior developers switch to another company at the middle of the project or threaten to do it.
     
    Shadab Khan
    Greenhorn
    Posts: 20
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator

    Originally posted by Dale DeMott:

    Actually if you could expand on this, I'd love to hear more about this question...
    [ May 02, 2003: Message edited by: Dale DeMott ]


    ok let me try again .. GenericServlet implements a servlet regardless of the protocol..its meant for servlets that are not neccessarily meant for the HTTP protocol..it provides a simple implementation of all the servlet lifecycle methods and it also has a service method in place but it takes the more "generic" ServletRequest and ServletReponse objects as parameters. i guess GenericServlet is probably in place because people back at Sun felt that in the near foreseeable future there might come a time when servlets might be run on protocols other than HTTP, at that time it will be easy to implement servlets for those particular portocols by extending the GenericServlet, so you probably will have one servlet class (like HttpServlet is for HTTP) for each of those protocols..ofcourse, right now servlets run only on the HTTP protocol..so you subclass from the HTTPServlet to implement a HTTP specific servlet
     
    Greenhorn
    Posts: 2
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    85. .
    A unicast packet is the complete opposite: one machine is talking to only one other machine. All TCP connections are unicast, since they can only have one destination host for each source host. UDP packets are almost always unicast too, though they can be sent to the broadcast address so that they reach every single machine in some cases.
    A multicast packet is from one machine to one or more. The difference between a multicast packet and a broadcast packet is that hosts receiving multicast packets can be on different lans, and that each multicast data-stream is only transmitted between networks once, not once per machine on the remote network. Rather than each machine connecting to a video server, the multicast data is streamed per-network, and multiple machines just listen-in on the multicast data once it's on the network.Difference between unicast and multicast
    [ February 21, 2004: Message edited by: sasikala kumaresan ]
     
    sasikala kumaresan
    Greenhorn
    Posts: 2
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    86.Main functionality of Remote Reference Layer
    This layer understands how to interpret and manage references made from clients to the remote service objects. In JDK 1.1, this layer connects clients to remote service objects that are running and exported on a server. The connection is a one-to-one (unicast) link. In the Java 2 SDK, this layer was enhanced to support the activation of dormant remote service objects via Remote Object Activation.
     
    Ranch Hand
    Posts: 1923
    Scala Postgres Database Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator

    13. How will you initialize an Applet ?
    Write my initialization code in the applets init method or applet constructor.


    Alternative way: from commandline call:
    appletviewer AnApplet
    To the question notepad/ IE, whether they are threads or processes:
    I don't know - from the behaviour, both might be possible.
    I assume they are different processes (and therefore different threads of cause too), but I guess it is only visible in the TaskManager - is it?
    It could have been implemented the other way (some Words and acrobats behave clearly that way).
    The Threadstarter could - from time to time - repost the list of numbers of open issues.
    It would be good to store the occured answers in an ordered and filtered way somewhere else (where new or better answers could be more easily be inserted, managed...).
    [ February 21, 2004: Message edited by: Stefan Wagner ]
     
    Ranch Hand
    Posts: 32
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Hi ,
    To make the posting readable I will post the answeres in two parts (a total of 9 questions).
    17. Yes I have used the hashtables and dictionary. Here are the differences I found :-
    A dictionary is a key-value pair somewhat akin to a hashtable. The crucial difference between the two structures is that a dictionary supports the notion of multi-keyed data whereas a hashtable uses a single object as a key
    48. A lightweight component is one that "borrows" the screen resource of an ancestor (which means it has no native resource of its own -- so it's "lighter").
    The advantages of creating lightweight components are the following:
    The Lightweight component can now have transparent areas by simply not rendering to those areas in its paint() method (although, until we get full shape support from Java2D, the bounding box will remain rectangular).
    The Lightweight component is "lighter" in that it requires no native data-structures or peer classes.
    There is no native code required to process lightweight components, hence handling of lightweights is 100% implemented in common java code, which leads to complete consistency across platforms.
    62. Difference between Application and Applet
    The difference between an application and an applet, is that an applet is used in a browser, and an application, in a stand alone mode. A Java applet is made up of at least one public class that has to be subclassed from java.awt.Applet. The applet is confined to living in the user's Web browser, and the browser's security rules, (or Sun's appletviewer, which has fewer restrictions).
    In an application, if you want to "show" something, you have to declare one or more panel, and add your stuff in it. In an applet, you only add your stuff directly into your applet. (Well, because an applet is just a kind of panel 8). A Java application is made up of a main() method declared as public static void that accepts a string array argument, along with any other classes that main() calls. It lives in the environment that the host OS provides.
    63. Serializable is a tagging interface; it prescribes no methods. It serves to assign the Serializable data type to the tagged class and to identify the class as one which the developer has designed for persistence.
    64. Difference between and servlet
    Servlets are effectively a Java version of CGI scripts, which are written in Perl, C, C++, UNIX shell scripts, etc. There are however, a few important differences.
    When a CGI program (or script) is invoked, what typically happens is that a new process is spawned to handle the request. This process is external to that of the webserver and as such, you have the overhead of creating a new process and context switching, etc. If you have many requests for a CGI script, then you can imagine the consequences! Of course, this is a generalization and there are wrappers for CGI that allow them to run in the same process space as the webserver. I think ISAPI is/was one of these.
    Java Servlets on the other hand actually run inside the webserver (or Servlet engine). The developer writes the Servlet classes, compiles them and places them somewhere that the server can locate them. The first time a Servlet is requested, it is loaded into memory and cached. From then on, the same Servlet instance is used, with different requests being handled by different threads.
    Of course, being Java, the compiled Servlet classes can be moved from one Servlet compatible webserver to another very easily. CGI programs or scripts on the other hand may be platform dependent, need to be recompiled or even webserver dependent
     
    Lalit K Kumar
    Ranch Hand
    Posts: 32
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    here is second posting.
    65.) An interface defines a protocol of behavior that can be implemented by any class anywhere in the class hierarchy. An interface defines a set of methods but does not implement them. A class that implements the interface agrees to implement all the methods defined in the interface, thereby agreeing to certain behavior.
    So, we can different implications of same method (that is in interface) in different classes.
    69.) In object-oriented programming, polymorphism refers to a programming language's ability to process objects differently depending on their data type or class. More specifically, it is the ability to redefine methods for derived classes. For example, given a base class shape, polymorphism enables the programmer to define different area methods for any number of derived classes, such as circles, rectangles and triangles. No matter what shape an object is, applying the area method to it will return the correct results. Polymorphism is considered to be a requirement of any true object-oriented programming language (OOPL).
    72.) Within a class definition, you can specify functions as being "virtual". Virtual functions can be re-implemented by sub-classes. Say you declare the function within the class Synchronous:
    virtual void getReady();

    Whatever your class needs to do to get ready will be done in getReady(). Now, a sub-class (say QuintSynchronous) can also delcare this function:

    virtual void getReady();

    However, it may do something else to get ready. It may, however still wish to call the getReady() function of its parent class, this can always be done by specifying the name of the parent class to distinguish between the own implementation of getReady() and the one of the parent class:
    Invariant::getReady();
    Purely Virtual functions.
    Sometimes, a base class doesn't implement any functionality, but defines a function that the sub-classes necessarily need to provide. The rest of the code can then rely on using this class, no matter what kind of sub-class is used. Such functions are called purely virtual and defined using "=0": void getReady()=0; // I don't implement anything, but the sub-classes need to !

    This is extremely useful when using pointers to an object, as the rest of the code can stay umodified when substituting one sub-class for another, if the rest of the code only depends on the functions declared in the parent-class (for instance Quintessence or Perturbation).
    88.) Java has absolutely no control over hardware
    Java has no pointers
    Java's class declaration syntax is alot easier than C++
    Java has no header-files
    Java has an automatic garbage collection
    Java is multithreaded
     
    clojure forum advocate
    Posts: 3479
    Mac Objective C Clojure
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    O my god, this is the best thread that I have ever heared....
    thank you all , especailly Debashish.
    I suggest to create a new forum and called : "The Best Of Threads"
    which contains the most useful threads in javaranch.
    waiting for more....
     
    Hussein Baghdadi
    clojure forum advocate
    Posts: 3479
    Mac Objective C Clojure
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    About the "7. What is the use of Servlets ?"
    I want to add the following :
    The Servlet plays the role "controller" in the MVC design pattern.
     
    Ranch Hand
    Posts: 202
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Candidates who have to resort to "crib notes" like this, rather than having true skill, will show their true colors on the job, if hired. Hopefully such will be terminated sooner than later. The work force has way too many incompetants as it is.
     
    Ranch Hand
    Posts: 704
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator

    Originally posted by Billybob Marshall:
    Candidates who have to resort to "crib notes" like this, rather than having true skill, will show their true colors on the job, if hired. Hopefully such will be terminated sooner than later. The work force has way too many incompetants as it is.


    I think this posting is a bit harsh. For a junior programmer it is important to know the sort of questions that come up in an interview situation.
     
    Billybob Marshall
    Ranch Hand
    Posts: 202
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator

    Originally posted by Nigel Browne:

    I think this posting is a bit harsh. For a junior programmer it is important to know the sort of questions that come up in an interview situation.


    An interviewer with a junior candidate would likely attempt to assess the candidate's skill at a junior level. If some of that assessment involves some of the questions posted here, the candidate would be expected to know how to answer them, without having a canned answer committed to memory. The questions and answers posted here are nothing but crib notes, with a pungeant odor of cheating.
     
    Greenhorn
    Posts: 1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator

    An interviewer with a junior candidate would likely attempt to assess the candidate's skill at a junior level. If some of that assessment involves some of the questions posted here, the candidate would be expected to know how to answer them, without having a canned answer committed to memory. The questions and answers posted here are nothing but crib notes, with a pungeant odor of cheating.



    I Think this is a good material for programmers, he is getting information which can give him a concept of things he should know before using them,
    About interview... if you can find out a static list of questions then there is something wrong with the interview process, the questions in interview should be more practical than these,like what is this and how it works...
     
    sunil choudhary
    Ranch Hand
    Posts: 144
    Redhat Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    This post is a list of technical java questions. lets keep it technical.
    No Offence meant
    [ August 12, 2004: Message edited by: sunil choudhary ]
     
    Ranch Hand
    Posts: 5093
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator

    Originally posted by sunil choudhary:
    This post is a list of technical java questions. lets keep it technical.
    No Offence meant

    [ August 12, 2004: Message edited by: sunil choudhary ]



    Official list? Didn't know there was an official list of questions and answers I have to have memorised and be capable of quickfiring off at a recruiter in order to get hired...

    I'm with Billybob, anyone who needs to memorise lists of questions and answers in order to get hired shouldn't get hired.
    And if the questions are so obscure that serious candidates don't know the answers the questions themselves are basically flawed.

    These questions fall across those 2 categories. Part are such basic knowledge that everyone should be able to answer them without having to resort to cheatsheets (making them useless for asking), the other part are so specific that noone has to worry about them except people who are dedicated to a specific field (mainly RMI I notice), which means the job will be such that unqualified people probably either won't apply or get on the job training as required. Again, the questions are useless. Either the candidate knows it already or he'll memorise the answer and get found out as a cheater first day on the job and let go with possibly a lawsuit for faking his CV.
     
    Ranch Hand
    Posts: 342
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    No offence intended to the contributors to this thread, but do people really get asked questions like this in an interview situation??? I'd be interested to know if this is the case, and I'd be surprised if it was true...but maybe I'm just naive? One thing I would say is that having Java certification pretty much covers it - it means you have answered questions about Java under test conditions and you know the theory (nt that I have certification yet, I'm working towards it because I use Java as required, rather than knowing a list of facts about it at present). Surely an employer would be unlikely to ask questions as specific as these. In my experience, interviews for permanent positions are carried out by less technical managerial types.

    I also agree with the comments above. If you have to learn answers to interview questions parrot fashion there is a basic problem with your interview technique and potentially your competency which sooner or later will run into problems on the job.

    But, then again, if it helps people out who are good developers but struggle in interviews then maybe that's OK
     
    Jeroen Wenting
    Ranch Hand
    Posts: 5093
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    most good people who struggle in interviews do so because of interpersonal skills not technical skills.

    For example, I know what I'm talking about but I'm quite introvert and get nervous making me appear uncertain and undecisive. Cramming only makes that worse.
     
    Ben Wood
    Ranch Hand
    Posts: 342
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    That's certainly true Jeroen. I have a way of masking my relatively introverted nature in interviews by coming out with loads of annoying buzzwords and other cringeworthy material...eugh, makes me shudder, but if you have managers on the panel I think it's what they are used to hearing. Seems to work, but I'm not proud of it I would never lie on my CV though, then it's their fault if they hire me and I turn out to be useless!

    I'm in the fortunate position that I have never been interviewed for a Java developer position. I got another position (HTML, JS, ORACLE, ColdFusion etc), and then just made them let me do Java when I arrived
     
    Peter den Haan
    author
    Posts: 3252
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator

    Originally posted by Jeroen Wenting:
    most good people who struggle in interviews do so because of interpersonal skills not technical skills.

    So far I didn't get any of my jobs through a normal interview process. I used to be an walking interview disaster. Funny thing is that I actually quite enjoy interviewing others. It does affect my attitude towards those I'm interviewing: I try to make people relax and give them space to show what makes them tick. Not that I won't ask some very tough questions.

    - Peter
     
    Ranch Hand
    Posts: 823
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    Hi guys,

    This thread seems to be creating waves! Remember that JavaRanch is a global forum and that practices and acceptable (or expected) behaviour in one culture can, and will, be quite different to that in another. So be nice.

    I hope you'd agree that it's not a bad exercise to go through the answers to potential interview questions in preparation for an interview. In practice it shouldn't be hard for an interviewer to determine if an individual really knows their stuff or is just reeling off a set of stock answers learned by rote.

    Personally, when swotting up on a topic I would go straight to the horse's mouth, i.e. Sun's tutorials, specs and the javadoc, or for a highly recommended book (good user reviews on, say, Amazon or specialist forums like the Ranch). As we've already seen, the postings of even very strong developers can contain errors or be just plain wrong. (yes, I know, so can books, etc. but it's less likely)

    I do, however, think that this kind of discussion, or Q&A session, is useful for junior and senior developers alike. I wouldn't recommend or even condone learning answers parrot fashion but seeing a thread like this one stimulates interest an can encourage people to find the answers to questions they hadn't previously thought of, or thought they knew the answer to but then realised they didn't know the detail. It's the same way that postings in forums work for some people - you see a thread topic you're interested in, read on, look it up on the web or in a book to cement your own understanding.

    Anyway, enough waffle from me. :roll:

    Jules
     
    town drunk
    ( and author)
    Posts: 4118
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    I agree with Peter and Julian. While it's always a good idea to study specific topics, nothing really beats knowing the technical material well.

    M
     
    Greenhorn
    Posts: 14
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Report post to moderator
    I found these questions useful,because, I feel while answering the interview questions, even though we know the answers, knowing how to put that information in correct and precise words is important;The answers to these questions, gave me an idea, of how much information is enough; because giving too much info. can get boring for the interviwer.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
      Bookmark Topic Watch Topic
    • New Topic