1。
How can you change the current working directory using an instance of the File class called FileName? 
1) FileName.chdir("DirName") 
2) FileName.cd("DirName") 
3) FileName.cwd("DirName") 
4) The File class does not support directly changing the current directory. 
2。
If you create a TextField with a constructor to set it to occupy 5 columns, what difference will it make if you use it with a proportional font (ie Times Roman) or a fixed pitch typewriter style font (Courier). 1)With a fixed font you will see 5 characters, with a proportional it will depend on the width of the characters 
2)With a fixed font you will see 5 characters,with a proportional it will cause the field to expand to fit the text 
3)The columns setting does not affect the number of characters displayed 
4)Both will show exactly 5 characters 
3。
You need to create a class that will store unique object elements. You do not need to sort these elements but they must be unique.  
What interface might be most suitable to meet this need?  
1)Set  
2)List  
3)Map  
4)Vector  4。
You have created a simple Frame and overridden the paint method as follows  
public void paint(Graphics g){  
g.drawString("Dolly",50,10);  
}  
What will be the result when you attempt to compile and run the program?  
1) The string "Dolly" will be displayed at the centre of the frame  
2) An error at compilation complaining at the signature of the paint method  
3) The lower part of the word Dolly will be seen at the top of the frame, with the top hidden.  
4) The string "Dolly" will be shown at the bottom of the frame. 
5.Which of the following can you perform using the File class? 1) Change the current directory 
2) Return the name of the parent directory 
3) Delete a file 
4) Find if a file contains text or binary information 
6.
You are using the GridBagLayout manager to place a series of buttons on a Frame. You want to make the size of one of the buttons bigger than the text it contains. Which of the following will allow you to do that?  
1) The GridBagLayout manager does not allow you to do this  
2) The setFill method of the GridBagLayout class  
3) The setFill method of the GridBagConstraints class  
4) The fill field of the GridBagConstraints class  7.
You are concerned that your program may attempt to use more memory than is available. To avoid this situation you want to ensure that the Java Virtual Machine will run its garbage collection just before you start a complex routine. What can you do to be certain that garbage collection will run when you want . 1) You cannot be certain when garbage collection will run 
2) Use the Runtime.gc() method to force garbage collection 
3) Ensure that all the variables you require to be garbage collected are set to null 4) Use the System.gc() method to force garbage collection 
8.
Which of the following most closely describes a bitset collection?  
1) A class that contains groups of unique sequences of bits  
2) A method for flipping individual bits in instance of a primitive type  
3) An array of boolean primitives that indicate zeros or ones  
4) A collection for storing bits as on-off information, like a vector of bits 9.
Which of the following statements are true?  
1) Methods cannot be overriden to be more private  
2) Static methods cannot be overloaded  
3) Private methods cannot be overloaded  
4) An overloaded method cannot throw exceptions not checked in the base class