×

Loading...

Topic

  • 工作学习 / IT杂谈 / Java job interview questions: Not too hard
    本文发表在 rolia.net 枫下论坛In these days, one of my duties is to phone screen the job candidates. I cooked up some simple questions to check whether the candidates have the experiences they claimed. I found my questions worked well. I post them here for reference.

    1) This is question regarding JDBC. We want to know some information about the database and the table we are accessing. What part of JDBC API do we need to use to get these information?

    2) Our website is built using Servlet and JSP technology. I want to add the following functionality for the home page. To record how many times our web site has been hit since its going live. Can you give us some suggestions how to implement it?

    3) Let me say I am writing a very important Java Servlet. Many other servelets need to use the service provided by this important servlet. How can we implement this requirement?

    4) Do you have experieces in image processing using Java Servlets? If yes, how do you get a Graphics object in an image processing servlet?

    5) Have you written any Custom tags? If yes, can you tell me the names of some major super classes and interfaces you have used in the Sun's tag library?

    answer : TagSupport, BodyTagSupport, Tag, BodyTag ...


    6) We can either use page directive or jsp standard library tag to include a file as we write a Web page using JSP. What's the difference in these two different ways to include external contents?


    7) Have you ever written any JavaBeans? What's the minimal requirements for the API of a JavaBean?


    8) In the present JSP technology, if we decide to use JavaBeans, how will handle those Beans with indexed properties?

    9) If you are asked to write a Stateful Session Bean to do some database transactions, which interface from Java Transaction package are going to use? Which methods of this interface are you going to use?

    answerr:
    javacx.transaction.Syncronization
    afterBegin()
    beforeCompletion()
    afterCompletion()


    10) If we are going to create an EnityBean component, we need some Primary Keys. What are basic requirements for a primary key class?

    11) For what kind of EJB components can we use pooling technology?

    12) How do we create a Thread in a EJB component?

    13) We just received an enterprise application divlivered by our partners. It comes in a form of an ear file. From a programmer's perspective, how would you like to investigate this software package? Let me assume there is no readme file and, Java API documentation, and Java source code.

    14) Here are some thing related to EJB client. After we get an EJB home interface from JNDI, we need to call a method named narrow().
    Can you tell me why?

    15) What are Phantom Reads?

    16) In developing EJB component, we need to pass in some parameters from configuaration file. This can be done in ejb-jar.xml file. Which elemenst of this XML file would you like to use to configure these paramerters?更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • Hey, thank you so much . u r really helpful .
    • hi jobber, can you tell me the answer of this question from you
      Q:13) We just received an enterprise application divlivered by our partners. It comes in a form of an ear file. From a programmer's perspective, how would you like to investigate this software package? Let me assume there is no readme file and, Java API documentation, and Java source code.
      • Here you are....
        本文发表在 rolia.net 枫下论坛For experienced guys, they will unzip the ear file using WinZip, or using Jar utility in the JDK. Then, they will try to find application.xml for the whole application. Further, they can find web.xml for Web componet, ejb-jar.xml for ejb component. Probably, they will find some other xml files, but those three are standard ones. From these XML files, one can learn a lot of information about the whole application. Of course, one can also use some other tools to reverse-engineer Java classes.

        As I use this question, I sometimes give people a hint that they can use Winzip or Jar. From their answers, I can learn if these guys have a big picture of J2EE application. If they cannot talk about ejb-jar.xml and web.xml files following my instructions, I will conclude they have no life-cyle experiences in J2EE, or they haven't studied J2EE thoroughly.

        Of course, it is a different story to you, because you are not talking face-to-face. My questions are really simple for people who have spent time.
        I can remember a hot discussion at this forum on resume faking. It seems to me that it is not difficult to kick off the fakes by some simple questions. On the other hand, if some one with no true project experiences can answer 10 of my 16 questions, I think he is very smart and have a great potential. In another word, I would be honored to be cheated on by this guy. If I have my own company or team, I would immediately hire such a liar! (Unfortunately, I don't have my company and team yet and I am still working for others).

        Regarding my questions on image process, if the candidate tells me he does not know anything about it, he is OK. However, if he tries to play odds without any experiences, he will lose the whole interview.更多精彩文章及讨论,请光临枫下论坛 rolia.net