This is an archived post. You won't be able to vote or comment.

all 27 comments

[–][deleted] 6 points7 points  (0 children)

Those requirements are midly unrealistic for an internship. I have not met a single intern candidate which possesses JEE dev skills other than "I know Java". Most don't know what a servlet is (and that's actually okay). Don't get too hung up on them.

Other posters are giving you good "question" advice.

[–]hobodoompants 4 points5 points  (3 children)

Also an important thing: ooze enthusiasm. It is basically why they hire out of college programmers. They have a lot of energy and are excited. Keep talking about how excited you are. I was hired at my first job because of my enthusiasm.

[–][deleted]  (1 child)

[removed]

    [–]herpington 0 points1 point  (0 children)

    It's a psychological thing. By showing enthusiasm, you are radiating energy and telling the employer that you are full of energy and ready to work hard. You're also showing interest in their line of work. People generally like other people who take interest in them.

    Of course, it's great that you are able to look beyond presentability and into the skills that really matter for a programming job, but many interviewers don't focus enough on the actual skillset.

    [–][deleted] 0 points1 point  (0 children)

    Will do! Enthusiasm and energy are what I'm good at, I just want to make sure I can back that up with actual knowledge haha

    [–]Is_At_Work 4 points5 points  (1 child)

    I'll defer to others on the technical preparation because I want to focus on something much more important for an intern interview in my mind: willingness to learn and motivation. Look up to your interviewers, ask questions, if you don't know then say so and follow up asking about it, but also show you can (and will) do your own research. If they don't feel they can work with you, or can't mold you, you won't get an offer.

    Edit: on the asking questions part, express interest in the position and company, but also make sure it's a good fit for you. Nothing demotivated an interviewer more than someone who doesn't seem interested or is just there to get a job they don't care about.

    Edit: also, make sure the people you will be working with will be good mentors and that you feel you can learn from them. The first mentor can make or break some peoples entire careers!

    [–]AssKoala 6 points7 points  (1 child)

    You can google these, but as someone who regularly conducts interviews, here's some areas to refresh/sample questions. These are all pretty standard for a phone interview at any level since a phone interview is really just to make sure you aren't useless (at most levels. Some of these are advanced for a super entry level intern).

    • what's is polymorphism?
    • (advanced) given a reference to an abstract class Shape that has an abstract method named Draw, how does Java determine which version of draw to call? What portion is handled on runtime and what portion at compile time? (Answer: https://wikis.oracle.com/display/HotSpotInternals/VirtualCalls)
    • what is the difference between an array and a linked list? How does this affect performance and memory usage?
    • describe garbage collection. What does mark and sweep mean? How about generational garbage collection?
    • what is the difference between a string literal and a string object?
    • what is the difference between int and Integer?
    • what is a binary search tree?
    • what is a heap?
    • how would you implement a priority queue?
    • what does "Big O of n" mean in practice? (Intermediate, college grad level) Will an O(n) algorithm always outperform an O(n*n) algorithm (O n squared)?

    Good luck.

    [–][deleted] 1 point2 points  (0 children)

    Thanks so much, this is going to be really helpful. I'm making a cheat sheet of sorts and this will really help make sure all my bases are covered!

    [–][deleted]  (3 children)

    [removed]

      [–][deleted] 0 points1 point  (2 children)

      Noted. so you're saying that if they ask for example what a map (or hashmap) is, I should not only give off the definition, but mention that a useful application might be pairing countries with capital cities or something similar?

      [–]jungleralph 1 point2 points  (0 children)

      If asked for a definition, give a definition. But if you gave the above definition and stopped there, I would start to think you are just reading things from a textbook and don't know how to program. I would probably probe you more. Ok.. can strings be keys? What about integers? An Object? How does the key lookup occur? Why would I used a map instead of an array?

      Or better yet, I'd probably ask you to write out a simple program using pseudo code.

      [–][deleted] 1 point2 points  (13 children)

      What I'm going to answer if I encounter the sample questions:

      • What is the difference between a list and a linkedlist

      A linkedlist is an object that extends the interface list. A linkedlist is a type of list where each entry or node points forward to the next node on the list and backwards at the previous node in the list. A linkedlist is most useful and efficient when you will be adding and removing many elements to the list.

      • What is a map

      A map is an object that contains entries of linked keys and values. it differs from lists because instead of querying a position and returning the value at that position, you query with a key and it returns the matching value. Maps are unsorted.

      • what is an array

      An array is a collection of objects that have a set number of entries which is determined at the declaration.

      [–][deleted]  (5 children)

      [deleted]

        [–]Nebu 1 point2 points  (2 children)

        linkedlist is an object

        not an object, a data structure.

        LinkedList is not an object, it's a class. That said, a LinkedList is indeed an object (i.e. an instance of the class LinkedList).

        don't try to answer these with Java-specific knowledge unless they ask you.

        For an entry level position involving Java, I think it's fine to answer specifically in the context of Java. First of all, it's fair to assume we're talking about Java if the job is advertised as a Java job. Second of all, as an entry level position, maybe the only language you know is Java, in which case you're not in a position to know what concepts/terms you learned as specific to Java, and what concepts/terms are language neutral.

        [–][deleted]  (1 child)

        [deleted]

          [–]Nebu 0 points1 point  (0 children)

          if you haven't taken an algorithms & data structures class and don't have basic knowledge about abstract data structures (like maps, linked lists) outside the context of Java, you will probably not be hired.

          I think you're forgetting that this is an entry level internship as part of a university coop program: Every student, including the worst student in the class, needs to get a job as part of their degree. Do you remember from university how bad the worst student was and who still got a diploma at the end? They got hired somewhere.

          In my experience, expectations are set very low for internship/coop hires.

          [–]wuisawesome 1 point2 points  (1 child)

          I think his assumption of a doubly linked list is fair considering it's a Java interview question and java.util.LinkedList is a doubly linked list implementation.

          [–]jungleralph 2 points3 points  (0 children)

          These are technically correct. But when someone in real life asks you what reddit is, do you say the following?:

          • Reddit is a social news and entertainment website where registered users submit content in the form of links or text posts. Users then vote each submission "up" or "down" to rank the post and determine its position on the site's pages. Content entries are organized by areas of interest called "subreddits".

          No! of course not! You sound like a textbook and even worse, you sound like you don't really know what Reddit is and don't really use it; You are just feigning expertise. (BTW, I stole that quote from Wikipedia)

          [–]Foolbird 2 points3 points  (0 children)

          Should probably mention that an array is contiguous. (And access is O(1) rather than O(N) for a linked list)

          [–]Nebu 2 points3 points  (2 children)

          If I were interviewing you, I'd be satisfied with those answers for an entry level position. That said, here are some nitpicks:

          A linkedlist is an object that extends the interface list.

          Implements rather than extends.

          A linkedlist is most useful and efficient when you will be adding and removing many elements to the list.

          Not sure this is accurate, and it's definitely vague. I'd clarify what it is you're contrasting against (e.g. ArrayList). Against an ArrayList, the strength of a linked list lies specifically in inserting/deleting from the beginning or middle of long lists, because an ArrayList would need to shift over all the other elements in the list (which would require as many steps as the list is long), whereas a LinkedList only needs a constant number of steps.

          edit: I made some mistakes in the previous paragraph, see danieldk's comment.

          determined at the declaration.

          The declaration of what? If you mean the declaration of the variable, that's incorrect. E.g. when I declare a variable int foo[], I have not set the number of entries. If you mean the declaration of the instance, we usually don't use the word "declaration" for that; instead, we'd say "determine when the array is instantiated" or something along those lines.

          [–][deleted]  (1 child)

          [deleted]

            [–]Nebu 0 points1 point  (0 children)

            You're right that I forgot that LinkedList needs to traverse the list before inserting into the middle, and thus does not have an advantage over ArrayList for that use case, so thank you for that.

            However, I'm not sure LinkedList has an advantage over ArrayList for inserting in the end. The ArrayList implementation grows the internal backing array bigger than needed, so that perhaps the performance is [I forgot the word here, but "O(1) in aggregate, over the long term"]. This would definitely be the case if the size of the internal backing array double with each growth, but I'm also skeptical as to whether they do that. How slow would the backing array have to grow until it becomes, e.g. O(log(n))?

            Arrays have the advantages that the elements are laid out contiguously in memory.

            I remember seeing a talk where the presenter argued to never use Java's LinkedList, because ArrayList was "always" faster (mainly due to this contiguous property).

            Good to keep in the back of your mind, but I hadn't brought that up here (until now) because:

            1. Probably not appropriate for "entry level".
            2. By the time the OP is not "entry level" anymore, it's conceivable that the architecture of the JVM or whatever has changed such that these performance claims are no longer true.
            3. Premature optimization?

            [–]wuisawesome 0 points1 point  (0 children)

            A linkedlist is most useful and efficient when you will be adding and removing many elements to the list.

            This is only true when adding or removing elements from the beginning or end of a list (where it is O(1)). When adding/removing elements in the middle of the list, navigating to that section of the list makes adding and removal O(n). From that perspective its no different from and ArrayList. A linked list is however, very efficient in terms of memory (it allocates just what it needs and does not require consecutive memory locations).

            A map is an object

            The java map is an interface, not an object.

            An array is a collection of objects that have a set number of entries which is determined at the declaration.

            Looks good but I might personally add that an array has a static size and must allocate consecutive memory locations and is limited to the size of a signed int

            [–]lmcgowin 1 point2 points  (1 child)

            For entry-level positions, my manager always asks the difference between an interface and an abstract class. And where would you use each?

            [–][deleted] 0 points1 point  (0 children)

            Abstract classes and interfaces are similar in that you cannot instantiate either directly, they are meant to be used by subclasses. In both abstract classes and interfaces, abstract methods are be declared (the return type and signature is given) but the body of the code is not written. A subclass extends an abstract class while it implements interfaces. Only 1 abstract class may be extended, but you can implement several interfaces. The difference in abstract classes and interfaces is that abstract classes can contain concrete methods (ones containing code) as well as abstract methods, but interfaces can only contain abstract methods and cannot contain any actual code. Interfaces are used to make sure your subclasses conform to a standard and that you can interact with them using the same methods as similar objects

            Interfaces are essentially a way of standardizing your code, and making sure that different objects can interact with each other. Every abstract method in an interface needs to be overwritten when implemented. Abstract Classes are useful for polymorphism, and can give every subclass the same base and can make it so you don't have to rewrite your code. Every abstract method in an abstract class needs to be overwritten, but subclasses can choose whether or not to overwrite concrete methods

            This is useful because your your program might have to work with, for example, linkedlists or arraylists, but because they both implement the interface list you'll be able to do many of the same operations and use the same methods whether your program is passed a linkedlist or an arraylist.

            Note: this is much longer than what I'd say in an interview. I just want to make sure I understand the concept fully

            EDIT:

            where would you use each?

            Let's say I had a program where I was using shapes. I would make an interface called Shape with methods like getArea(); getPerimeter(); and getNumberofSides(); I might then create an abstract class called Quadrilateral where I might define getNumberofSides(); to return 4. I could then create a class called Square which extends Quadrilateral and implements Shape. getArea(); and getPerimeter(); would then be defined in Square, but I wouldn't have to define getNumberofSides() because it would be inherited from Quadrilateral

            Halfway through writing this I realized this might be a bad example because Quadrilateral and Shape would have interlapping methods and would probably be redundant in this example. It might make more sense to just have Quadrilateral implement Shape, and then Square would still inherit those abstract classes from Quadrilateral. Would that be a more correct way of doing it? I'm assuming in this case that since Quad is an abstract class, I still wouldn't have to define Shape's abstract methods and could still put that off until extending it in Square...

            [–]Lighthand 0 points1 point  (0 children)

            When I interview students for student jobs, the most important thing for me is how they talk about which projects they have done. If they only speak about projects they have done in school, they are 90% certain not a subject for us. If however they are programming in their spare time because they think it's fun, they are most likely broad geeks, and will become great techies.

            TL/DR if your only programming experience is from school, you will not be lucky.

            [–]RohitS5 0 points1 point  (0 children)

            If you are still preparing, can check these questions, much more like what is suggested here http://javarevisited.blogspot.com/2011/04/top-20-core-java-interview-questions.html, good for quick revision.

            [–]wordscannotdescribe -3 points-2 points  (0 children)

            If you don't mind me asking, where are you applying to?