Good Questions
Good Questions
eye-to-eye contact, smiling all the way. don't miss anyone in the corner.
asking easier and relevant questions back to the interviewers occasionally.
be honest to answer technical questions, you are not expert to know everything.
don't let your boss feel you might be a threat to take his position.
don't be critical, focus on what you can do
try to be humor to show your smartness.
don't act in a superior way.
find right time to raise questions and answer those questions to show your
strength.
aggressively to get candidacy info back after interviewing.
--------------------------------------------------------------------------------
the following questions are unrelated with java technology, but they may be asked.
so study this list, plan your answers ahead of time and you'll be ready to deliver
them with confidence. (cited from my email box someone sent)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
if you are employed, focus on what you want in your next job: "after two years, i
made the decision to look for a company that is team-focused, where i can add my
experience."
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
what are three positive things your last boss would say about you?
it's time to pull out your old performance appraisals and boss's quotes. this is a
great way to brag about yourself through someone else's words: "my boss has told
me that i am the best designer he has ever had. he knows he can rely on me, and he
likes my sense of humor."
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
how did you handle your most challenging experience in your previous job?
smoothly, generally speaking. but i am a good team work player and always share my
experience with others and learn from others.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
here are some other job interview questions you might want to rehearse.
your qualifications
what would you like to being doing five years from now?
how will you judge yourself successful? how will you achieve success?
what type of position are you interested in?
how will this job fit in your career plans?
what do you expect from this job?
do you have a location preference?
can you travel?
what hours can you work?
when could you start?
your work experience
how do you think your education has prepared you for this position?
what were your favorite classes/activities at school?
why did you choose your major?
do you plan to continue your education?
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
however, it is still important to know what the current salary range is for the
profession. find salary surveys at the library or on the internet, and check the
classifieds to see what comparable jobs in your area are paying. this information
can help you negotiate compensation once the employer makes an offer.
--------------------------------------------------------------------------------
"what are your hobbies?" and "do you play any sports?"
the interviewer may be looking for evidence of your job skills outside of your
professional experience. for example, hobbies such as chess or bridge demonstrate
analytical skills. reading, music, and painting are creative hobbies. individual
sports show determination and stamina, while group sport activities may indicate
you are comfortable working as part of a team. also, the interviewer might simply
be curious as to whether you have a life outside of work. employees who have
creative or athletic outlets for their stress are often healthier, happier and
more productive.
--------------------------------------------------------------------------------
"what are your career goals?" or "what are your future plans?"
the interviewer wants to know if your plans and the company's goals are
compatible. let him know that you are ambitious enough to plan ahead. talk about
your desire to learn more and improve your performance, and be specific as
possible about how you will meet the goals you have set for yourself.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
if you did have problems, be honest. show that you can accept responsibility and
learn from your mistakes. you should explain any problems you had (or still have)
with an employer, but don't describe that employer in negative terms. demonstrate
that it was a learning experience that will not affect your future work.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
return to top
--------------------------------------------------------------------------------
java language
only the most important questions listed below and they are not categorized, since
your interviewing questions will not be categorized either.
what are three ways in which a thread can enter the waiting state?
a thread can enter the waiting state by invoking its sleep() method, by blocking
on i/o, by unsuccessfully attempting to acquire an object's lock, or by invoking
an object's wait() method. it can also enter the waiting state by invoking its
(deprecated) suspend() method.
what's new with the stop(), suspend() and resume() methods in jdk 1.2?
the stop(), suspend() and resume() methods have been deprecated in jdk 1.2.
what modifiers may be used with an inner class that is a member of an outer class?
a (non-local) inner class may be declared as public, protected, private, static,
final, or abstract.
how many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?
unicode requires 16 bits and ascii require 7 bits. although the ascii character
set uses only 7 bits, it is usually represented as 8 bits. utf-8 represents
characters using 8, 16, and 18 bit patterns. utf-16 uses 16-bit and larger bit
patterns.
is sizeof a keyword?
the sizeof operator is not a keyword.
what are wrapped classes?
wrapped classes are classes that allow primitive types to be accessed as objects.
does garbage collection guarantee that a program will not run out of memory?
no, it doesn't. it is possible for programs to use up memory resources faster than
they are garbage collected. it is also possible for programs to create objects
that are not subject to garbage collection
what is the difference between the boolean & operator and the && operator?
if an expression involving the boolean & operator is evaluated, both operands are
evaluated. then the & operator is applied to the operand. when an expression
involving the && operator is evaluated, the first operand is evaluated. if the
first operand returns a value of true then the second operand is evaluated. the &&
operator is then applied to the first and second operands. if the first operand
evaluates to false, the evaluation of the second operand is skipped.
operator & has no chance to skip both sides evaluation and && operator does. if
asked why, give details as above.
what is the difference between the reader/writer class hierarchy and the
inputstream/outputstream class hierarchy?
the reader/writer class hierarchy is character-oriented, and the
inputstream/outputstream class hierarchy is byte-oriented.
if a class is declared without any access modifiers, where may the class be
accessed?
a class that is declared without any access modifiers is said to have package or
friendly access. this means that the class can only be accessed by other classes
and interfaces that are defined within the same package.
which class should you use to obtain design information about an object?
the class class is used to obtain information about an object's design.
what are the problems faced by java programmers who don't use layout managers?
without layout managers, java programmers are faced with determining how their gui
will be displayed across multiple windowing systems and finding a common sizing
and positioning that will work within the constraints imposed by each windowing
system.
what is the difference between static and non-static variables?
a static variable is associated with the class as a whole rather than with
specific instances of a class. non-static variables take on unique values with
each object instance.
what is casting?
there are two types of casting, casting between primitive numeric types and
casting between object references. casting between numeric types is used to
convert larger values, such as double values, to smaller values, such as byte
values. casting between object references is used to refer to an object by a
compatible class, interface, or array type reference.
how is it possible for two string objects with identical values not to be equal
under the == operator?
the == operator compares two objects to determine if they are the same object in
memory. it is possible for two string objects to have the same value, but located
indifferent areas of memory.
what is tunnelling?
tunnelling is a route to somewhere. for example, rmi tunnelling is a way to make
rmi application get through firewall. in cs world, tunnelling means a way to
transfer data.
does the code in finally block get executed if there is an exception and a retrun
statement in a catch block?
if an exception occurs and there is a return statement in catch block, the finally
block is still executed. the finally block will not be executed when the
system.exit(1) statement is executed earlier or the system shut down earlier or
the memory is used up earlier before the thread goes to finally block.
how you restrict a user to cut and paste from the html page ?
using javascript to lock keyboard keys. it is one of solutions.
return to top
--------------------------------------------------------------------------------
networking
sockets & rmi
urlconnection connection;
try{ url = new url("...");
connection = url.openconnection();
}catch (malformedurlexception e) { }
what is a socket?
a socket is one end-point of a two-way communication link between two programs
running on the network. a socket is bound to a port number so that the tcp layer
can identify the application that data is destined to be sent. socket classes are
used to represent the connection between a client program and a server program.
the java.net package provides two classes--socket and serversocket--which
implement the client side of the connection and the server side of the connection,
respectively.
what is rmi?
rmi is a set of apis that allows to build distributed applications. rmi uses
interfaces to define remote objects to turn local method invocations into remote
method invocations.
return to top
--------------------------------------------------------------------------------
jdbc
what is jdbc?
jdbc is a layer of abstraction that allows users to choose between databases. it
allows you to change to a different database engine and to write to a single api.
jdbc allows you to write database applications in java without having to concern
yourself with the underlying details of a particular database.
eg.
class.forname("sun.jdbc.odbc.jdbcodbcdriver");
your driver documentation will give you the class name to use. for instance, if
the class name is jdbc.driverxyz , you would load the driver with the following
line of code:
e.g.
class.forname("jdbc.driverxyz");
e.g.
string url = "jdbc:odbc:fred";
connection con = drivermanager.getconnection(url, "fernanda", "j8");
e.g.
resultset rs = stmt.executequery("select cof_name, price from coffees");
second:
string s = rs.getstring("cof_name");
e.g.
preparedstatement updatesales = con.preparestatement("update coffees set sales = ?
where cof_name like ?");
e.g.
callablestatement cs = con.preparecall("{call show_suppliers}");
resultset rs = cs.executequery();
how to retrieve warnings?
sqlwarning objects are a subclass of sqlexception that deal with database access
warnings. warnings do not stop the execution of an application, as exceptions do;
they simply alert the user that something did not happen as planned. a warning can
be reported on a connection object, a statement object (including
preparedstatement and callablestatement objects), or a resultset object. each of
these classes has a getwarnings method, which you must invoke in order to see the
first warning reported on the calling object
e.g.
sqlwarning warning = stmt.getwarnings();
if (warning != null) {
e.g.
connection con = drivermanager.getconnection("jdbc:mysubprotocol:mysubname");
statement stmt = con.createstatement(resultset.type_scroll_sensitive,
resultset.concur_updatable);
resultset uprs = ("select cof_name, price from coffees");
return to top
--------------------------------------------------------------------------------
jsp
what is jsp technology?
java server page is a standard java extension that is defined on top of the
servlet extensions. the goal of jsp is the simplified creation and management of
dynamic web pages. jsps are secure, platform-independent, and best of all, make
use of java as a server-side scripting language.
why are jsp pages the preferred api for creating a web-based client program?
because no plug-ins or security policy files are needed on the client
systems(applet does). also, jsp pages enable cleaner and more module application
design because they provide a way to separate applications programming from web
page design. this means personnel involved in web page design do not need to
understand java programming language syntax to do their jobs.
what are the two kinds of comments in jsp and whats the difference between them
<%-- jsp comment --%>
<!-- html comment -->
return to top
--------------------------------------------------------------------------------
servlet
what is the servlet?
servlets are modules that extend request/response-oriented servers, such as java-
enabled web servers. for example, a servlet may be responsible for taking data in
an html order-entry form and applying the business logic used to update a
company's order database.
when a servlet accepts a call from a client, it receives two objects. what are
they?
serveltrequest: which encapsulates the communication from the client to the
server.
servletresponse: which encapsulates the communication from the servlet back to the
client.
servletrequest and servletresponse are interfaces defined by the javax.servlet
package.
what information that the servletrequest interface allows the servlet access to?
information such as the names of the parameters passed in by the client, the
protocol (scheme) being used by the client, and the names of the remote host that
made the request and the server that received it. the input stream,
servletinputstream.servlets use the input stream to get data from clients that use
application protocols such as the http post and put methods.
what information that the servletresponse interface gives the servlet methods for
replying to the client?
it allows the servlet to set the content length and mime type of the reply.
provides an output stream, servletoutputstream and a writer through which the
servlet can send the reply data.
if you want a servlet to take the same action for both get and post request, what
you should do?
simply have doget call dopost, or vice versa.
which code line must be set before any of the lines that use the printwriter?
setcontenttype() method must be set before transmitting the actual document.
how http servlet handles client requests?
an http servlet handles client requests through its service method. the service
method supports standard http client requests by dispatching each request to a
method designed to handle that request.
when using servlets to build the html, you build a doctype line, why do you do
that?
i know all major browsers ignore it even though the html 3.2 and 4.0
specifications require it. but building a doctype line tells html validators which
version of html you are using so they know which specification to check your
document against. these validators are valuable debugging services, helping you
catch html syntax errors.(http://validator.w3.org and
http://www.htmlhelp.com/tools/validator/ are two major online validators)
what is servletcontext?
-
return to top
--------------------------------------------------------------------------------
ejb
what is ejb?
ejb stands for enterprise javabean and is the widely-adopted server side component
architecture for j2ee. it enables rapid development of mission-critical
application that are versatile, reusable and portable across middleware while
protecting it investment and preventing vendor lock-in.
ejb components are server-side components written entirely in the java programming
language
ejb components contain business logic only - no system-level programming &
services, such as transactions, security, life-cycle, threading, persistence, etc.
are automatically managed for the ejb component by the ejb server.
ejb architecture is inherently transactional, distributed, portable multi-tier,
scalable and secure.
ejb components are fully portable across any ejb server and any os.
ejb architecture is wire-protocol neutral--any protocol can be utilized like
iiop,jrmp, http, dcom,etc.
what are the key benefits of the ejb technology?
session beans,
entity beans, and
message-driven beans.
return to top
--------------------------------------------------------------------------------
j2ee
what is j2ee?
j2ee is an environment for developing and deploying enterprise applications. the
j2ee platform consists of a set of services, application programming interfaces
(apis), and protocols that provide the functionality for developing multitiered,
web-based applications.
therefore, jta is a high level transaction interface that your application uses to
control transaction. and jts is a low level transaction interface and ejb uses
behind the scenes (client code doesn't directly interact with jts. it is based on
object transaction service(ots) which is part of corba.
what is jaxp?
jaxp stands for java api for xml. xml is a language for representing and
describing text-based data which can be read and handled by any program or tool
that uses xml apis.
what is jaap?
the java authentication and authorization service (jaas) provides a way for a j2ee
application to authenticate and authorize a specific user or group of users to run
it. it is a standard pluggable authentication module (pam) framework that extends
the java 2 platform security architecture to support user-based authorization.
what is model 1?
using jsp technology alone to develop web page. such term is used in the earlier
jsp specification. model 1 architecture is suitable for applications that have
very simple page flow, have little need for centralized security control or
logging, and change little over time. model 1 applications can often be refactored
to model 2 when application requirements change.
what is model 2?
using jsp and servelet together to develop web page. model 2 applications are
easier to maintain and extend, because views do not refer to each other directly.
what is struts?
a web page development framework. struts combines java servlets, java server
pages, custom tags, and message resources into a unified framework. it is a
cooperative, synergistic platform, suitable for development teams, independent
developers, and everyone between.
controller--servlet controller which supplied by struts itself; view --- what you
can see on the screen, a jsp page and presentation components; model --- system
state and a business logic javabeans.
return to top
--------------------------------------------------------------------------------
jms
java message service is the new standard for interclient communication. it allows
j2ee application components to create, send, receive, and read messages. it
enables distributed communication that is loosely coupled, reliable, and
asynchronous.
return to top
--------------------------------------------------------------------------------
misc
what is wml?
wireless markup language (wml) page is delivered over wireless application
protocol (wap) and the network configuration requires a gateway to translate wap
to http and back again. it can be generated by a jsp page or servlet running on
the j2ee server.
what is junit?
junit is a unit-testing framework. unit-testing is a means of verifying the
results you expect from your classes. if you write your test before hand and focus
your code on passing the test you are more likely to end up with simple code that
does what it should and nothing more. unit-testing also assists in the refactoring
process. if your code passes the unit-test after refactoring you will know that
you haven't introduced any bugs to it.