Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

what are the most common questions on Java job interviews?

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 765
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Bye,
Viki.
[ November 08, 2003: Message edited by: Vikrama Sanjeeva ]
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Anish Shar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Folks,
got the naming right now, forgive a green horn :-)
 
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got some of the following
1.What is static and dynamic binding?
2.What parts in java are static bound and dynamic bound?
3.How does JVM achieve synchronization?
 
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the difference between a abstract class and an interface ?

Tony
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Functionality of interface in JAVA.
2. Difference between class String and StringBuffer.
3. Illustrate two or three Design Patterns, why and how to use them.
My answers
1.
  • Implement multi-inheritance
  • Separate the implementation
  • Easy to extend implementation
  • 2.
  • The content of a String object cannot be changed, but that of StringBuffer can.
  • Performance of using StringBuffer is good.
  • 3.
  • MVC, used in GUI design and web design.
  • Adapter, class adapter and object adapter.
  • Factory, encapsulate the implementation and easy to extend implementation

  • Light
    [ November 12, 2003: Message edited by: Light Wan ]
     
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Originally posted by Rei Damle:
    I got some of the following
    1.What is static and dynamic binding?
    2.What parts in java are static bound and dynamic bound?
    3.How does JVM achieve synchronization?



    What's the answer to those then?
     
    Ranch Hand
    Posts: 54
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
     
    Ranch Hand
    Posts: 5093
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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.
     
    Greenhorn
    Posts: 15
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Slightly out of topic here but this thread reminds me of a really funny question my friend was asked.
    "How many EJBs can you write in a day?"
    I am still figuring out a good answer to it.
     
    Evacuate the building! Here, take this tiny ad with you:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    reply
      Bookmark Topic Watch Topic
    • New Topic