Java Interview Questions - 8

 

In our earlier tutorial we have seen lot of Java interview questions and sample programs. In this tutorial we see similar set of interview questions and answers.


What is the purpose of the System class?


Which TextComponent method is used to set a TextComponent to the read-only state?


How are the elements of a CardLayout organized?


Is &&= a valid Java operator?


Name the eight primitive Java types.


Java Interview Questions - 7

Which class should you use to obtain design information about an object?


What is the relationship between clipping and repainting?


Is "abc" a primitive value?


What is the relationship between an event-listener interface and an event-adapter class?


What restrictions are placed on the values of each case of a switch statement?


What modifiers may be used with an interface declaration?


Is a class a subclass of itself?


What is the highest-level event class of the event-delegation model?


What event results from the clicking of a button?


How can a GUI component handle its own events?


What is the difference between a while statement and a do statement?


How are the elements of a GridBagLayout organized?


What advantage do Java's layout managers provide over traditional windowing systems?


What is the Collection interface?


What modifiers can be used with a local inner class?


What is the difference between static and non-static variables?


What is the difference between the paint() and repaint() methods?


What is the purpose of the File class?


Can an exception be rethrown?


Which Math method is used to calculate the absolute value of a number?


How does multithreading take place on a computer with a single CPU?


When does the compiler supply a default constructor for a class?


When is the finally clause of a try-catch-finally statement executed?


Which class is the immediate superclass of the Container class?


If a method is declared as protected, where may the method be accessed?


How can the Checkbox class be used to create a radio button?


Which non-Unicode letter characters may be used as the first character of an identifier?


What restrictions are placed on method overloading?


What happens when you invoke a thread's interrupt method while it is sleeping or waiting?


What is casting?


What is the return type of a program's main() method?


Name four Container classes.


What is the difference between a Choice and a List?


What class of exceptions are generated by the Java run-time system?


What class allows you to read objects directly from a stream?


What is the difference between a field variable and a local variable?


Under what conditions is an object's finalize() method invoked by the garbage collector?


How are this() and super() used with constructors?


What is the relationship between a method's throws clause and the exceptions that can be thrown during the method's execution?


What is the difference between the JDK 1.02 event model and the event-delegation model introduced with JDK 1.1?


How is it possible for two String objects with identical values not to be equal under the == operator?


Why are the methods of the Math class static?


What Checkbox method allows you to tell if a Checkbox is checked?


What state is a thread in when it is executing?


What are the legal operands of the instanceof operator?


How are the elements of a GridLayout organized?


What an I/O filter?


If an object is garbage collected, can it become reachable again?


What is the Set interface?


What classes of exceptions may be thrown by a throw statement?


What are E and PI?


Are true and false keywords?


What is a void return type?


What is the purpose of the enableEvents() method?


What is the difference between the File and RandomAccessFile classes?


What happens when you add a double value to a String?


What is your platform's default character encoding?


Which package is always imported by default?


What interface must an object implement before it can be written to a stream as an object?


How are this and super used?


What is the purpose of garbage collection?


What is a compilation unit?


What interface is extended by AWT event listeners?


What restrictions are placed on method overriding?


How can a dead thread be restarted?


What happens if an exception is not caught?


What is a layout manager?


Which arithmetic operations can result in the throwing of an ArithmeticException?


What are three ways in which a thread can enter the waiting state?


Can an abstract class be final?


What is the ResourceBundle class?


What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?


What is numeric promotion?


What is the difference between a Scrollbar and a ScrollPane?


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


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


Can try statements be nested?


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


What is the purpose of a statement block?


What is a Java package and how is it used?


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


What are the Object and Class classes used for?


How does a try statement determine which catch clause should be used to handle an exception?


Can an unreachable object become reachable again?


When is an object subject to garbage collection?


What method must be implemented by all threads?


What methods are used to get and set the text label displayed by a Button object?


Which Component subclass is used for drawing and painting?


What are synchronized methods and synchronized statements?


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


What are the problems faced by Java programmers who don't use layout managers?


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


What is the List interface?




No comments:
Write comments