This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I got one interview and I got these questions: 1) define the relationship between a class and an object. 2) define polymorphism. 3) define inheritance. 4) define encapsulation. I guess that these questions are pretty standard, but I can think of at least two correct answers to these questions, given the space they gave me to write the answers. How would you answer these questions if you had only 2 or 3 lines to write down? And what are other questions (not especially Java related, just OO related) that you guys already faced on job interviews? Thanks for any help. I think this is an important issue, because you think you know this stuff but sometimes they�re hard to answer or define with just a few lines then you would expect.
<b><i>Bengt Hammarlund</i><br />� Sun Certified Java Programmer</b>
Hi, Today I faced very short_quick interview session on Java. Three questions were asked. 1: How much work u have done in Java? 2: What is JMS? 3: What is the difference b/w Java & J2EE. My Answers: 1: I have done SCJP. Most of the projects I developed was using Java. 2: It is a Messaging service used in communication purpose. [i don't know about JMS much therefore I stop here.] 3: J2EE is specifically for Server Side development uing Servlets+JSP. Whereas Java is part of J2EE as a language.. and u can develop Desktop Applications in simple Java. For Question 1: I usually hate to answer such question. Specially this one. Because I can't measure my Java skills. Since measuring is done w.r.t some reference frame. With which reference I measure my XYZ skills? Plz. Correct me where I am wrong.
Regarding java questions, recently I got asked a bunch of them 1-" difference between java.util.date and java.sql.date" still have not figured it out 2- vectors and array list - which should be used and where vectors are synchonized so unless we need them, we should just make do with array list
-<br />everybody makes a mistake, some just dont ever learn!!
Joined: Nov 10, 2003
Folks, got the naming right now, forgive a green horn :-)
Vectors are *not* de rigeur since Java 1.4 ArrayList has better performance. Other reasons are safer processing I think. Of the other collection types - Vectors,Hashtables and HashMaps , HashMaps performed the worst.
regards [ November 10, 2003: Message edited by: HS Thomas ]
This is the layout of the last interview I was at: First 5 questions were simple eg how do you execute a java command a javah b javac c run d start e java Then some tricky ones.
The above will compile. This wont though
Nothing on inheritance. All questions had 7 lines of code or less. - 5 & 2 = ? - 5 && 2 = ? - z = 6 y = 4; y = --z; what is the value of y and z now? - same as above with z-- instead of --z; - One tricky question where the conditions of the code are never met eg: x = 2; if ( x < 0) x++; x = ?
- Define polymorphism - " inheritance - " encapsulation - what is http - " ftp - " a server - " application server - what is a Proxy Server' - What iis a java bean
when can you start? Indeed during my latest (and last) interview that was the most relevant question asked. I make sure my CV tells my work experience in sufficient detail that the technologies used can be derived from that. The interview was more about the backgrounds of those projects, the structure of the teams etc. I think they'd already decided I had the skills needed based on my CV and just needed to get to know the person.