SlideShare a Scribd company logo
or you can also search the tutorial on
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?

More Related Content

PPTX
Python-classes-in-mumbai
PDF
Python master class part 1
PPTX
The Awesome Python Class Part-2
PDF
Python master class 2
KEY
Labor and delivery
PPTX
Chua nhat 27 thuong nien man c ( 06 10-13 )
PPTX
PPTX
Libr 1101 kayla, colunda, jalese, & keira 1
Python-classes-in-mumbai
Python master class part 1
The Awesome Python Class Part-2
Python master class 2
Labor and delivery
Chua nhat 27 thuong nien man c ( 06 10-13 )
Libr 1101 kayla, colunda, jalese, & keira 1

Similar to Comp 328 week 4 midterm exam (20)

DOCX
Java questions for viva
PDF
The java interview questions ebook - confused coders
PDF
Probable questions for semester exam
PDF
What`s new in Java 7
DOC
Core java interview questions1
DOC
Core java questions
DOC
Core java questions
DOC
Java interview faq's
PDF
Java interview questions
PDF
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
PDF
Object oriented programming -QuestionBank
DOCX
JAVA QUESTIONS -6
PDF
Core java interview questions
PDF
Hands-On Ethical Hacking and Network Defense 1st Edition Simpson Test Bank
PDF
Java Programming.pdf
PDF
Java MCQ Important Questions and Answers
PDF
Java question bank
DOC
Java interview questions
PPTX
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Java questions for viva
The java interview questions ebook - confused coders
Probable questions for semester exam
What`s new in Java 7
Core java interview questions1
Core java questions
Core java questions
Java interview faq's
Java interview questions
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Object oriented programming -QuestionBank
JAVA QUESTIONS -6
Core java interview questions
Hands-On Ethical Hacking and Network Defense 1st Edition Simpson Test Bank
Java Programming.pdf
Java MCQ Important Questions and Answers
Java question bank
Java interview questions
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Ad

More from krtioplal (12)

DOCX
Comp 328 week 6 lab 6
DOCX
Comp 328 week 4 lab 4
DOCX
Comp 328 week 3 lab 3
DOCX
Comp 328 final guide
DOCX
Comp 328 week 2 lab 2
DOCX
Comp 328 week 1 lab 1
DOCX
Comp 328 entire course
DOCX
Comp 328 week 5 lab 5
DOCX
Abs 200 week 5 dq 1 global issues
DOCX
Abs 200 week 3 step one of final paper
DOCX
Abs 200 week 2 dq 1 empowerment
DOCX
Abs 200 final guide
Comp 328 week 6 lab 6
Comp 328 week 4 lab 4
Comp 328 week 3 lab 3
Comp 328 final guide
Comp 328 week 2 lab 2
Comp 328 week 1 lab 1
Comp 328 entire course
Comp 328 week 5 lab 5
Abs 200 week 5 dq 1 global issues
Abs 200 week 3 step one of final paper
Abs 200 week 2 dq 1 empowerment
Abs 200 final guide
Ad

Recently uploaded (20)

PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
Trump Administration's workforce development strategy
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PPTX
Lesson notes of climatology university.
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
Classroom Observation Tools for Teachers
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
IGGE1 Understanding the Self1234567891011
PDF
Computing-Curriculum for Schools in Ghana
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Orientation - ARALprogram of Deped to the Parents.pptx
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Trump Administration's workforce development strategy
Indian roads congress 037 - 2012 Flexible pavement
Unit 4 Skeletal System.ppt.pptxopresentatiom
Lesson notes of climatology university.
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Hazard Identification & Risk Assessment .pdf
Cell Types and Its function , kingdom of life
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Classroom Observation Tools for Teachers
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
IGGE1 Understanding the Self1234567891011
Computing-Curriculum for Schools in Ghana
History, Philosophy and sociology of education (1).pptx
Chinmaya Tiranga quiz Grand Finale.pdf
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
LDMMIA Reiki Yoga Finals Review Spring Summer

Comp 328 week 4 midterm exam

  • 1. or you can also search the tutorial on 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?
  • 2. 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?