Saturday, March 10, 2007

JAVA QUESTIONS

JAVA QUESTIONS:

# 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?

# Are constructors inherited? Can a subclass call the parent's class constructor? When?

# What synchronization constructs does Java provide? How do they work?

# Why "bytecode"? Can you reverse-engineer the code from bytecode?

# Does Java have "goto"?

# What does the "final" keyword mean in front of a variable? A method? A class?

# Access specifiers: "public", "protected", "private", nothing?

# What is JDBC? Describe the steps needed to execute a SQL query using JDBC.

# What is RMI?

# What are native methods? How do you use them?

# What does the keyword "synchronize" mean in java. When do you use it? What are the disadvantages of synchronization?

# How many different types of JDBC drivers are present? Discuss them.

# What is the difference between a Vector and an Array. Discuss the advantages and disadvantages of both?

# Describe java's security model.

# Java says "write once, run anywhere". What are some ways this isn't quite true?

# What is the difference between an Applet and an Application?

# How can you force all derived classes to implement a method present in the base class?

# What are abstract classes, abstract methods?

# What's the difference between == and equals method?

# Describe, in general, how java's garbage collector works?

# What is the difference between StringBuffer and String class?

# How can you achieve Multiple Inheritance in Java?

# What are interfaces?

# What are the main differences between Java and C++?

# In Java, You can create a String object as: String str = "abc"; & String str = new String("abc"); Why cant a button object be created as : Button bt = "abc" Why is it compulsory to create a button object as: Button bt = new Button("abc"); Why is this not compulsory in String's case?

# Why are Java ARchive (JAR) files important?

# What is it reflection (introspection) ? Why is reflection possible in the Java language?

# How to make application thread-safe ?

# What is it object serialization?

# What do you know about networking support in Java?

# What you know about Corba implementation in Java?
#What is Java Beans?

# Compare SWING components to standard AWT.

# What is layout manager ? How does it work?

# What is the purpose of the toolkit in the Abstract Window Toolkit (AWT)? How does AWT work?

# What are the differences between Java & C++ in terms of its features?

# Is the ternary operator written x : y ? z or x ? y : z ?

# What is the List interface?

# What is the difference between an if statement and a switch statement?

# What are the problems faced by Java programmers who don't use layoutmanagers?

# What are the two basic ways in which classes that can be run as threads may be defined?

# What are synchronized methods and synchronized statements?

# Which Component subclass is used for drawing and painting?

# What methods are used to get and set the text label displayed by a Buttonobject?

# What method must be implemented by all threads?

# When is an object subject to garbage collection?

# Can an unreachable object become reachable again?

# How does a try statement determine which catch clause should be used tohandle an exception?

# What are the Object and Class classes used for?

# What modifiers may be used with a top-level class?

# What is a Java package and how is it used?

# What is the purpose of a statement block?

# What is the difference between the prefix and postfix forms of the ++ operator?

# Can try statements be nested?

# To what value is a variable of the boolean type automatically initialized?

# What is the difference between a public and a non-public class?

No comments:

Post a Comment