Professional Documents
Culture Documents
I am “Carlos Ibarra”
I have more than 10 Years of experience in Core Java/J2EE, Hibernate, Spring Framework, Design
Pattern, Apache Tomcat, JBoss, Websphere, Oracle, JUnit, Log4j, XML, JEERA and Maven etc.
I have worked in different domain like E-Commerce, Banking, and Insurance domain.
I have worked for some of the clients like HP, TERNIUM, PEMEX
From what I read, your company is one of the leaders in providing resources. I read the list of clients
on your website. Do you mostly serve Fortune 500 clients? I saw a couple big Fortune 500 companies
mentioned on the list, including softek”
“Since beginning my career, I’ve wanted to work for a larger organization in this industry, and I know
you’re one of the leaders in this space. I’m very interested in one position in US
“I’m looking for more leadership opportunities. I’ve been at my company for almost three years and
have really enjoyed the experience but I feel in order to take the next step in my career, it’d be helpful
to join a larger organization and use what I’ve learned in the past to lead more projects.
“In my last job, we were facing a tough deadline and my boss was out for the day. Our client was
expecting a project to be delivered by 5PM, but we were far behind schedule. I took the lead on the
project, delegated tasks to the four other team members in a way that I thought would utilize
everyone’s strengths best. And then I re-organized my own personal tasks so I could dedicate my
entire day to contributing to this project as well. The project was a success and we delivered the work
on-time. I went on to lead more projects after that, and used what I learned to be a better lead.”
“I read on the job description that you’re looking for someone with experience in java. I’ve done that
for 15 years and can immediately help you
I left to pursue an opportunity that I felt was more aligned with what I’ve chosen to focus on in my
career.”
It is difficult for me to say NO. I always try to help my colleagues even knowing that my work can be
delayed.
“I’m glad you asked. In 5 years I see myself taking on more responsibilities, either through
management or higher level individual contributions.
OOP
What is Java?
Java is a computer programming language that is concurrent, class-based and object-oriented. The
advantages of object oriented software development are shown below:
● Abstraction
● Encapsulation
● Polymorphism
● Inheritance
● Predefined types must be objects
● User defined types must be objects
● Operations must be performed by sending messages to objects
Class:A class can be defined as a template/blueprint that describes the behavior/state that the object
of its type support.
Object: Objects have states and behaviors. Example: A dog has states - color, name, breed as well
as behaviors – wagging the tail, barking, eating. An object is an instance of a class.
Servlet: The servlet is a class in the Java programming language, used to extend the capabilities of a
server. Although servlets can respond to any type of request, they are commonly used to extend
applications hosted by web servers
Inheritance: is a property that allows the declaration of new classes from existing ones. This provides
one of the main advantages of Object Oriented Programming: the reuse of previously developed code
since it allows a more specific class to incorporate the structure and behavior of a more general class.
polymorphism means many forms. There are two types of polymorphism in Java: compile-time
polymorphism and runtime polymorphism. We can perform polymorphism in java by method
overloading and method overriding.
Abstraction: Data Abstraction is the property by virtue of which only the essential details are
displayed to the user.The trivial or the non-essentials units are not displayed to the user. Ex: A car is
viewed as a car rather than its individual components.
What does the keyword "static" mean, and where can it be used?
Class static, internal classes that are not tied to its container class. In addition, static can be used in a
code block of a class to specify code that will be executed when the virtual machine is started for the
first time.
What is composition?
Composition is exactly like Aggregation except that the lifetime of the ‘part’ is controlled by the
‘whole’. This control may be direct or transitive. That is, the ‘whole’ may take direct responsibility for
creating or destroying the ‘part’, or it may accept an already created part, and later pass it on to some
other whole that assumes responsibility for it.
What is JVM?
A Java virtual machine (JVM) is a process virtual machine that can execute Java bytecode. Each
Java source file is compiled into a bytecode file, which is executed by the JVM.
Tools like Maven and Gradle help manage them. You should consider learning more about Maven to
prepare this question
What is a Constructor?
A constructor gets invoked when a new object is created. Every class has a constructor. In case the
programmer does not provide a constructor for a class, the Java compiler (Javac) creates a default
constructor for that class.
● All methods in an interface are implicitly abstract. On the other hand, an abstract class
may contain both abstract and non-abstract methods.
● A class may implement a number of Interfaces, but can extend only one abstract class.
● In order for a class to implement an interface, it must implement all its declared methods.
However, a class may not implement all declared methods of an abstract class. Though,
in this case, the sub-class must also be declared as abstract.
● Abstract classes can implement interfaces without even providing the implementation of
interface methods.
● Variables declared in a Java interface is by default final. An abstract class may contain
non-final variables.
● Members of a Java interface are public by default. A member of an abstract class can
either be private, protected or public.
● An interface is absolutely abstract and cannot be instantiated. An abstract class also
cannot be instantiated, but can be invoked if it contains a main method.
What does the keyword synchronized? Tell me how to use it to establish a single variable
without conditions.
synchronized tells a method that it has to keep blocking the object when executing. If used around a
block, such as synchronized (obj) {...}, it will block the obj object before executing that block.
What are the differences between interfaces, abstract classes, classes and instances?
Interfaces are basically a list of methods without code or member variables that must be implemented
Abstract classes can not be instantiated, but they can contain variables, implemented or
unimplemented methods.
The classes contain variables and only implemented methods, and can be instantiated.
MAPS - COLLECTIONS
What are the differences between Map, Hashtable, HashMap, TreeMap, ConocurrentHashMap,
LinkedHashMap?
ConcurrentHashMap allows several threads to access it at the same time and safely
LinkedHashMap preserves the order of iteration of the objects that were inserted (others do not
provide a fixed iteration order)
What is difference between Array and ArrayList? When will you use Array over ArrayList?
The Array and ArrayList classes differ on the following features:
● Arrays can contain primitive or objects, while an ArrayList can contain only objects.
● Arrays have fixed size, while an ArrayList is dynamic.
● An ArrayList provides more methods and features, such as addAll, removeAll, iterator, etc.
● For a list of primitive data types, the collections use autoboxing to reduce the coding
effort. However, this approach makes them slower when working on fixed size primitive
data types.
Java provides the Comparator interface, which contains two methods, called compare and
equals. The first method compares its two input arguments and imposes an order between
them. It returns a negative integer, zero, or a positive integer to indicate that the first
argument is less than, equal to, or greater than the second. The second method requires an
object as a parameter and aims to decide whether the input object is equal to the comparator.
The method returns true, only if the specified object is also a comparator and it imposes the
same ordering as the comparator.
What is an Iterator?
The Iterator interface provides a number of methods that are able to iterate over any Collection. Each
Java Collection contains the iterator method that returns an Iterator instance. Iterators are capable of
removing elements from the underlying collection during the iteration.
VARIABLES -THREADS
What is Local Variable and Instance Variable?
Local variable:
Instance variable:
Explain different ways of creating a thread. Which one would you prefer and why?
There are three ways that can be used in order for a Thread to be created:
The Runnable interface is preferred, as it does not require an object to inherit the Thread class. In
case your application design requires multiple inheritance, only interfaces can help you. Also, the
thread pool is very efficient and can be implemented and used very easily.
EXCEPTIONS
What is the purpose of garbage collection in Java, and when is it used?
The purpose of garbage collection is to identify and discard those objects that are no longer needed
by the application, in order for the resources to be reclaimed and reused.
What are the differences between Checked Exception and Unchecked Exception?
Checked Exception:
Unchecked Exception:
WEB
What is the difference between doGet() and doPost()?
doGET: The GET method appends the name-value pairs on the request’s URL. Thus, there is a limit
on the number of characters and subsequently on the number of values that can be used in a client’s
request. Furthermore, the values of the request are made visible and thus, sensitive information must
not be passed in that way. doPOST: The POST method overcomes the limit imposed by the GET
request, by sending the values of the request inside its body. Also, there is no limitations on the
number of values to be sent across. Finally, the sensitive information passed through a POST request
is not visible to an external client.
● Status Code: describes the status of the response. It can be used to check if the request
has been successfully completed. In case the request failed, the status code can be used
to find out the reason behind the failure. If your servlet does not return a status code, the
success status code, HttpServletResponse.SC_OK, is returned by default.
● HTTP Headers: they contain more information about the response. For example, the
headers may specify the date/time after which the response is considered stale, or the
form of encoding used to safely transfer the entity to the user. Seehow to retrieve headers
in Servlet here.
● Body: it contains the content of the response. The body may contain HTML code, an
image, etc. The body consists of the data bytes transmitted in an HTTP transaction
message immediately following the headers.
What is a cookie?
A cookie is a bit of information that the Web server sends to the browser. The browser stores the
cookies for each Web server in a local file. In a future request, the browser, along with the request,
sends all stored cookies for that specific Web server.
● The session should work, regardless of the settings on the client browser. The client may
have chosen to disable cookies. However, the sessions still work, as the client has no
ability to disable them in the server side.
● The session and cookies also differ in the amount of information the can store. The HTTP
session is capable of storing any Java object, while a cookie can only store String objects.
What is Spring?
Spring is an open source development framework for enterprise Java. The core
features of the Spring Framework can be used in developing any Java application, but
there are extensions for building web applications on top of the Java EE platform.
Spring framework targets to make J2EE development easier to use and promote good
programming practice by enabling a POJO-based programming model