COMP 328 Week 4 Midterm Exam (Devry) Click Here To Buy The Tutorial http://www.uophelp.com/COMP-328-(Devry)/product-8969-comp-328-week-4midterm-exam-(devry) For more course tutorials visit www.uophelp.com
1. What is UNIX? a. Operating System b. Company c. Programming Language 2. Which company originally developed UNIX? a. NASA b. Novel c. AT&T (BELL) d. Apple e. IBM 3. What is UNIX Shell? a. A game b. A command-line interpreter c. A hardware d. A text editor 4. Which command will display a Calendar?
a. cal b. dis cal c. view Cal d. calendar 5. Which command can be used to display the contents of a file on the screen? a. ls b. grep c. dog d. cat 6. To list the permissions on files, which of the following commands will work? a. ls b. ls –a c. ls –l d. more –al 7. The ________ command will display the absolute pathname for the directory that you are wokring in. a. dir b. whereami c. pwd d. ls 8. To change access modes on files you can use the chmod command. a. True b. False 9. What does a Java class contain that identifies it as a Java application?
10. How are static methods different from non-static methods? How do you invoke a static method? Give an example of a static method. 11. Explain the difference between an object reference in Java and an object. Use an example to illustrate your answer. 12. Explain how objects are created in Java and how the memory used by objects is recovered. 13. How do you get the first character of a string in Java? How do you access the last character of a string? Use Java code to illustrate your answer. 14. How would you write an expression in Java to generate a random integer value between 100 and 200, where the numbers 100 and 200 were both included in the set of possible numbers that could be generated? 16. What is the difference between throwing an exception and catching an exception? 17. Explain the difference between a checked exception and an unchecked exception. 18. What happens if an exception does not have a matching catch block? 19. What can your program do with the exception object that a catch block receives? 20. What is the purpose of the finally block?