aspose file tools*
The moose likes Jobs Discussion and the fly likes Interview Questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Careers » Jobs Discussion
Bookmark "Interview Questions " Watch "Interview Questions " New topic
Author

Interview Questions

D. Rose
Ranch Hand

Joined: Apr 25, 2003
Posts: 215
Hi All,
Following are some of the interview questions I faced. If we can make a bank of questions, it will help all people.

1.Is there operator overloading in java?
No

2.+ operator in java is overloaded e.g. String concatenation. How we can achieve this?
Though Java specifies certain overloaded operators, it does not support user-defined overloading of operators.
3.What methods of a class can be overridden? Public and protected
4.Can overridden method have different return type?No
5.What is static and dynamic binding?
6.What parts in java are static bound and dynamic bound?
7.What is difference between an interface and abstract class?
Abstract class can provide some default implementation and delegate some to subclasses. Interfaces do not provide any implementation.
8.What is difference between singleton design pattern and a class with all static methods?Singleton can be changed to incorporate multiple instances while it is not possible with static method approach.
9.What are servelet filters?
A filter is an object that can transform the header or content or both of a request or response. Can be attached to any web resource.
10.Explain stateless session beans lifecycle
11.Who is responsible for linking remote EJB interface and actual implementation?
12.What are advantages of Web services over Corba?HTTP based so internet friendly. Firewall filtering possible.
13.How does JVM achieve synchronization?JVM uses monitors and wait sets to implement synchronization. Monitor is data structure which can save information about single thread only. Each object has a monitor associated with it. Threads waiting for the object are put in wait set.
14.How can we enforce static binding for Java code?
Ritu Chawla
Greenhorn

Joined: Jun 02, 2003
Posts: 14
Any answers to these questions?
Anupama Dande
Greenhorn

Joined: May 09, 2003
Posts: 10
Good, that u share ur interview questions with others, I like that.
Looks like u had an interview on J2EE, Servlets n Core java.
Could u please let me know any good books I can go thru for my preparation to be enhanced.
Good books or links regarding the EJB Questions (Mostly with answers ). Actually I want any good site/book which can explain me the main differences between the concepts(like CMP vs BMP,Local Vs Home ...).
Jon Poole
Ranch Hand

Joined: Jun 19, 2003
Posts: 31
The answer to number 3 is incomplete. You can also override a method with default (aka package level) access.
>3.What methods of a class can be overridden? >Public and protected
Nadine McKenzie
Ranch Hand

Joined: Feb 15, 2002
Posts: 53
Wasn't sure about the static and dynamic binding so I asked someone. Dynamic binding occurs at runtime using reflection. Correct?
Can someone shed some light on static binding? I'm assuming it involves polymorphism???
Also, regarding overriding, one picky question that can surface during an interview is the following:
ClassA has a private MethodB and ClassB extends ClassA.
(1) Can ClassB can also have a MethodB with the exact same signature and return type.
The answer is yes.
(2)Is ClassB's MethodB overriding ClassA's method?
The answer is No. Why? Since ClassA's method is private, ClassB will not know it exists.


Nadine -SCJP, SCWCD, SCBCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interview Questions