Technical Question Bank: Advanced Java

Recruiters conduct technical interviews to identify the right candidates for technical or specialist job positions. These interviews check your understanding of technical field. Go through the important concepts of Advanced Java to ace your interview well.
 
List of Technical Questions based on Advanced Java
  • What is a transient variable?
  • Which containers use a border Layout as their default layout?
  • Why do threads block on I/O?
  • How are Observer and Observable used?
  • What is synchronization and why is it important?
  • Can a lock be acquired on a class?
  • What's new with the stop(), suspend() and resume() methods in JDK 1.2?
  • Is null a keyword?
  • What is the preferred size of a component?
  • What method is used to specify a container's layout?
  • Which containers use a Flow Layout as their default layout?
  • What state does a thread enter into when it terminates its processing?
  • What is the Collections API?
  • Which characters may be used as the second character of an identifier, but not as the first character of an identifier?
  • What is the List interface?
  • How are integer overflows and underflows handled in JAVA?
  • What is a Vector class?
  • What modifiers may be used with an inner class that is a member of an outer class?
  • What is an Iterator interface?
  • What is the difference between the >> and >>> operators?
  • Which method of the Component class is used to set the position and size of a component?
  • Differentiate between yielding and sleeping.
  • Which java util classes and interfaces support event handling?
  • What are wrapped classes?
  • Does garbage collection guarantee that a program will not run out of memory?
  • What restrictions are placed on the location of a package statement within a source code file?
  • Can an object's finalize() method be invoked while it is reachable?
  • What is the immediate superclass of the Applet class?
  • Differentiate between preemptive scheduling and time slicing.
  • Name three Component subclasses that support painting.
  • What value does readLine() return when it reaches the end of a file?
  • What is the immediate superclass of the Dialog class?
  • What is clipping?
  • What is a native method?
  • Can a for statement loop indefinitely?
  • What are order of precedence and associativity, and how are they used?
  • When a thread blocks on I/O, what state does it enter?
  • To what value is a variable of the String type automatically initialized?
  • What is the catch or declare rule for method declarations?
  • What is the difference between a Menu Item and a Checkbox Menu Item?
  • What is a task's priority and how is it used in scheduling?
  • What class is the top of the AWT event hierarchy?
  • What is a thread's initial state when it is created and started?
  • Can an anonymous class be declared while implementing an interface and extending a class?
  • What is the immediate superclass of Menu?
  • Explain the purpose of finalization.
  • Which class is the immediate superclass of the Menu Component class?
  • What invokes a thread's run() method?
  • What is the difference between the Boolean & operator and the && operator?
  • Name three subclasses of the Component class.
  • What is the Gregorian calendar class?
  • Which Container method is used to cause a container to be laid out and redisplayed?
  • Explain the purpose of the Runtime class.
  • How many times may an object's finalize() method be invoked by the garbage collector?
  • What is the purpose of the finally clause of a try-catch-finally statement?
  • What is the argument type of a program's main() method?
  • Which Java operator is right associative?
  • Can we cast a double value to a byte?
  • What must a class do to implement an interface?
  • What method is invoked to cause an object to begin executing as a separate thread?
  • Name two subclasses of the Text Component class.
  • Which containers may have a Menu Bar?
  • How are commas used in the initialization and iteration parts of a 'for' statement?
  • What is the purpose of the wait(), notify(), and notify All() methods?
  • What is an abstract method?
  • How are Java source code files named?
  • What is the relationship between the Canvas class and the Graphics class?
  • What are the high-level thread states?
  • What value does read() return when it has reached the end of a file?
  • Can a Byte object be cast to a double value?
  • What is the difference between a static and a non-static inner class?
  • What is the difference between the String and String Buffer classes?
  • If a variable is declared as private, where may the variable be accessed?
  • What is an object's lock and which objects have locks?
  • What is the Dictionary class?
  • How are the elements of a Border Layout organized?
  • What is the % operator?
  • When can an object reference be cast to an interface reference?
  • What is the difference between a Window and a Frame?
  • Which class is extended by all other classes?
  • Can an object be garbage collected while it is still reachable?
  • The ternary operator written as x : y ? z or x ? y : z
  • What is the difference between the Font and Font Metrics classes?
  • How is rounding performed under integer division?
  • What happens when a thread cannot acquire a lock on an object?
  • What is the difference between the Reader/Writer class hierarchy and the Input Stream/Output Stream class hierarchy?
  • What classes of exceptions may be caught by a catch clause?
  • If a class is declared without any access modifiers, where may the class be accessed?
  • What is the Simple Time Zone class?
  • What is the Map interface?
  • Does a class inherit the constructors of its superclass?
  • For which statements does it make sense to use a label?
  • What is the purpose of the System class?
  • Which Text Component method is used to set a Text Component to the read-only state?
  • How are the elements of a Card Layout organized?
  • Is &&= a valid Java operator?
  • Name the eight primitive Java types.
  • 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?
  • How are the elements of a Grid Bag Layout 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 is 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?
  • 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 instance of operator?
  • How are the elements of a GridBagLayout organized?
  • What an I/O filter?
  • If an object is garbage collected, can it become reachable again?
  • What is a Set interface?
  • What classes of exceptions may be thrown by a throw statement?
  • What are E and PI?
  • Explain 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 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 Arithmetic Exception?
  • 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?
If you have any question, suggestion or feedback, feel free to post it in the discussion box given below.
Rate Us
Views:9427