Friday, January 19, 2007

Java Questions-1

# How do I instantiate a bean whose constructor accepts parameters using the useBean tag?
# Replacing Characters in a String?
# Searching a String?
# Connecting to a Database and Strings Handling?
# What is a transient variable?
# What is the difference between Serializalble and Externalizable interface?
# How many methods in the Externalizable interface?
# How many methods in the Serializable interface?
# How to make a class or a bean serializable?
# What is the serialization?
# What are synchronized methods and synchronized statements?
# What is synchronization and why is it important?
# What is the purpose of finalization?
# What classes of exceptions may be caught by a catch clause?
# What is the difference between the Reader/Writer class hierarchy and the InputStream/ OutputStream class hierarchy?
# What happens when a thread cannot acquire a lock on an object?
# What restrictions are placed on method overriding?
# What restrictions are placed on method overloading?
# How does multithreading take place on a computer with a single CPU?
# How is it possible for two String objects with identical values not to be equal under the == operator?
# How are this() and super() used with constructors?
# What class allows you to read objects directly from a stream?
# What is the ResourceBundle class?
# What interface must an object implement before it can be written to a stream as an object?
# What is Serialization and deserialization?
# What are the Object and Class classes used for?
# Can you write Java code for declaration of multiple inheritance in Java ?
# What do you mean by multiple inheritance in C++ ?
# Write the Java code to declare any constant (say gravitational constant) and to get its value.
# What are the disadvantages of using threads?
# Given two tables Student(SID, Name, Course) and Level(SID, level) write the SQL statement to get the name and SID of the student who are taking course = 3 and at freshman level.
# What do you mean by virtual methods?
# What do you mean by static methods?
# What do mean by polymorphism, inheritance, encapsulation?
# What are the advantages of OOPL?
# How many methods do u implement if implement the Serializable Interface?
# Are there any other 'marker' interfaces?
# What is the difference between instanceof and isInstance?
# Why do you create interfaces, and when MUST you use one?
# What's the difference between the == operator and the equals() method? What test does Object.equals( ) use, and why?
# Discuss the differences between creating a new class, extending a class and implementing an interface; and when each would be appropriate.
# Given a text file, input.txt, provide the statement required
# Name four methods every Java class will have.
# What does the "abstract" keyword mean in front of a method? A class?
# Does Java have destructors?

No comments:

Post a Comment