University of Cincinnati Logo
 

20-CS-694 - Advanced Programming Techniques
Electrical Engineering and Computing Systems

   
Frequently Asked Questions
 
Java    
    1.   What happens when a Thread is interrupted by an InterruptedException - where is the exception caught?
 
    2.   Suppose class C extends class A and implements interface B. Can C implement a method that has the same signature in both A and B?
 
    3.   Can a class implement two interfaces if they specify the same function?
 
    4.   I don't get it. How does "interface" help provide services from multiple classes?
 
    5.   If a package imports a class A and your code imports the package, is the class A automatically imported by your code?
 
    6.   Does a user-created class inherit from class Object even if it does not extend from Object directly?
 
    7.   Can one use reflection classes to interpret objects read from file using readObject from an ObjectInputStream without type casting them?
 
    8.   Name some java supported protocols.
 
    9.   How does one create an image from an array?
 
    10.   Need to implement an interface method that is inherited from super class?
 
    11.   Can super invoke the parent's inherited method?
 
    12.   What error do you get when referencing an uninstantiated array?
 
    13.   Can you add buttons to a panel after init()?
 
    14.   Can reference to buttons, etc., be obtained on the fly.
 
    15.   Wow! Can you show me more?
 
    16.   If two classes implement ActionListener (say), whose actionPerformed will be invoked?
 
    17.   How do I set my PATH variable on helios to run and compile java code?
 
    18.   How do I run an applet?
 
    19.   What about an application version of the seconds timer?
 
    20.   Can you show an example of notify not notifying threads in a different monitor?
 
    21.   Besides the notify variants, how can I wake up a Java thread?
 
    22.   Can you tell me what Java's thread running policy is, anyway?
 
    23.   Can I access a private field using setDouble()?
Can I use getBoolean() on a double field?
 
    24.   Is it possible for an interfaced service provider to broadcast responses to several clients?
 
    25.   What's the deal with those * symbols in import statements?
 
    26.   Can I return to a statement after one in which an Exception is raised?
 
    27.   What's the deal on finally?
 
    28.   Can interactions between scrollbars in this be stopped using synchronized?
 
    29.   Why not double buffer images like crazy instead of clipping?
 
    30.   What's the deal on multiple threads in the Checkers game?
 
    31.   How can you change memory dynamically in Java?
 
    32.   Can you reimplement the garbage collector?
 
    33.   Can java garbage collect C code from JNI?
 
    34.   Why do I need to use JFrame and JPanel - doesn't one subsume the other?
 
ERC
MainStreet
Paul Erdos
NIT
Ladies on Campus
Oscar Robinson