SlideShare a Scribd company logo
1 of 3
Download to read offline
Chapter 1 Introduction to Computers, Programs, and Java 1. A Java program with more than one
class will run. a. True b. False 2. A Java program can have more than one class but all the classes
must be public. a. True b. False 3. Considering the program code below. What possible class or
classes will be created when the program is compiled? a. class A only b. classes A and C c.
classes A , B and C d. There will be a compilation error because class C is declared public 4. the
following words to the best appropriate description. Words: a) Dial-up Modem b) DSL c) Cable
Modem d) NIC e) LAN stands for Network Interface Card, which is a device that connects the
computer to the Internet. stands for Local Area Network, which connects computers within a
limited area such as a school, a home, or an office. uses a phone line to dial a phone number to
connect to the Internet. stands for Digital Subscriber Line that directly connects a computer to
the Internet through a phone without having to dial up a number. uses a cable TV line to connect
to the Internet. 5. Which of these components interconnects computer subsystems? a. Bus b.
Keyboard c. Data d. Network Cable 6. Identify the items that are intangible parts of the computer
system. a. Motherboard b. Disk c. Operating system d. Application program 7. The unit that
coordinates the actions of other units of the computer is a. Control unit b. Arithmetic unit c.
Logic unit d. Peripheral unit 8. is the brain of a computer. a. Hardware b. CPU c. Memory d.
Disk 9. The intermediate code from JVM is called a. Byte code b. Bit code c. Machine code d.
Assembly code 10. Java use the following translator in executing translating its source code to
object code. a. Compiler and Interpreter b. Compiler only c. Interpreter only d. Assembler only
11. Match the following words to its best description Word: a) Machine Language b) Assembly
Language c) High-Level Language d) Source Code e) Interpreter f) Assembler g) Compiler is
English-like, easy to learn and use. uses short descriptive word to represent each of the machine-
language instructions. is computer's native language. translates the entire source code into a
machine-code file. processes one statement at a time, translates it to the machine code, and
executes it. is a program written in a high-level programming language. is a program that
translates assembly-language code into machine code. 12. The speed of the CPU may be
measured in a. megabytes b. gigabytes c. megahertz d. gigahertz 13. Why do computers use
zeros and ones? a. because combinations of zeros and ones can represent any numbers and
characters. b. because digital devices have two stable states and it is natural to use one state for 0
and the other for 1 . c. because binary numbers are simplest. d. because binary numbers are the
bases upon which all other number 14. Two byte has bits. a. 4 b. 8 c. 12 d. 16 15. One gigabyte is
approximately bytes. a. 1 million b. 10 million c. 1 billion d. 1 trillion 16. A program and its data
must be moved into the computer's before they can be executed by the CPU. a. memory b. hard
disk c. CP U d. CD-ROM 17. A computer's is volatile; that is, any information stored in it is lost
when the system's power is turned off. a. Memory b. hard disk c. flash stick d. CD-ROM 18.
Which of the following are storage devices? a. portable disk b. hard disk c. flash stick d. CD-
ROM 19. The specifies the number of pixels in horizontal and vertical dimensions of the display
device. a. screen resolution b. pixel c. dot pitch d. monitor 20. is a device to connect a computer
to a local area network (LAN). a. Regular modem b. DSL c. Cable modem d. NIC 21. are
instructions to the computer. a. Hardware b. Software c. Programs d. Keyboards 22. Computer
can execute the code in a. machine language b. assembly language c. high-level language d. none
of the above 23. translates high-level language program into machine language program. a. An
assembler b. A compiler c. CP U 23. is an operating system. a. Java b. C + + c. Windows d.
Visual Basic e. Ada 24. is a program that runs on a computer to manage and control a computer's
activities. a. Operating system b. Java c. Modem d. Interpreter e. Compiler 25. Due to security
reasons, Java cannot run from a Web browser in the new version of Java. a. Applications b.
Applets c. Servlets d. Micro Edition programs 26. is not an object-oriented programming
language. a. Java b. C + + c. C d. CH e. Python 27. is interpreted. a. Java b. C + + c. C d. Ada e.
Pascal 28. is architecture-neutral. a. Java b. C + + c. C d. Ada e. Pascal 29. is a technical
definition of the language that includes the syntax and semantics of the Java programming. a.
Java language specification b. Java API c. Java JDK d. Java IDE 30. contains predefined classes
and interfaces for developing Java programs. a. dava language specification b. Java A P 1 c. Java
JDK d. Java IDE 31. consists of a set of separate programs for developing and testing Java
programs, each of which is invoked from a command line. a. Java language specification b. Java
A P I c. Java JDK d. Java IDE 32. _provides an integrated development environment (IDE) for
rapidly developing Java programs. a. Java language specification b. Java API c. Java JDK d. Java
IDE 33. The main method header is written as: 3. public static void main(string[] args) b. public
static void Main(String[] args) c. public static void main(String[] args) d. public static
main(String[] args) e. public void main(String[] args) 34. Which of the following statements is
correct? a. Every line in a program must end with a semicolon. b. Every statement in a program
must end with a semicolon. c. Every comment line must end with a semicolon. d. Every method
must end with a semicolon. e. Every class must end with a semicolon. 35. Which of the
following statements is correct to display Welcome to Java on the console? a.
System.out.println("Welcome to Java"); b. System.out.println("Welcome to Java"); c.
System.println("Welcome to Java"): d. System.out.println("Welcome to Java"'); e.
System.out.println("Welcome to ava"); 36. The JDK command to just compile a class (not run)
in the file Test.java is a. java Test b. java Test.java c. javac Test.java d. javac Test e. JAVAC
Test.java 37. Which JDK command is correct to run a Java application in ByteCode.class? a.
java ByteCode b. java ByteCode.class c. javac ByteCode.java d. javac ByteCode e. JAVAC
ByteCode 38. Java compiler translates Java source code into a. Java bytecode b. machine code c.
assembly code d. another high-level language code 39. is a software that interprets Java
bytecode. a. Java virtual machine b. Java compiler c. Java debugger d. Java API 40. Suppose you
define a Java class as follows, the source code should be stored in a file named public class Test
{ } a. Test.class b. Test.doc c. Test.txt d. Test.java e. Any name with extension .java 41. The
extension name of a Java bytecode file is a. java b. .obj c. class d. exe 42. The extension name of
a Java source code file is a. .java b. .obj c. class d. exe 43. Which of the following lines is not a
Java comment? a. / comments / b. // comments c. - comments d. / / comments / e. ** comments
44. Which of the following are the reserved words? a. Public b. Static c. Void d. class 45. Every
statement in Java ends with a. a semicolon (i) b. a comma (,) c. a period (.) d. an asterisk ( ) 46. A
block is enclosed inside a. Parentheses b. Braces c. Brackets d. Quotes 47. Programming style is
important, because a. a program may not compile if it has a bad style b. good programming style
can make a program run faster c. good programming style makes a program more readable d.
good programming style helps reduce programming errors 48. Analyze the following code. I:
public class Test { public static void main(String[] args) { System.out.println("Welcome to
Java!"); } } II: public class Test { public static void main(String[] args) {
System.out.printIn("Welcome to Java!"); }} a. Both I and II can compile and run and display
Welcome to Java, but the code in II has a better style than I. b. Only the code in I can compile
and run and display Welcome to Java. c. Only the code in II can compile and run and display
Welcome to Java. d. Both I and II can compile and run and display Welcome to Java, but the
code in I has a better style than II. Key:d Both I and II are the same except the format is
different. Format is a readability issue only. 49. Which of the following code has the best style?
I: public class Test { public static void main(String[] args) { System.out.println("Welcome to
Java!"); } } II: public class Test { public static void main(String[] args) {
System.out.println("Welcome to Java!"); } } III: public class Test { public static void
main(String[] args) { System.out.println("Welcome to Java!"); } } IV: public class Test {
public static void main(String[] args) { System.out.println("Welcome to Java!"); } } a. 1 b. II
c. III d. IV 50. If a program compiles fine, but it produces incorrect result, then the program
suffers a. a compile error b. a runtime error c. a logic error 51. If you forget to put a closing
quotation mark on a string, what kind of error will be raised? a. a compile error b. a runtime error
c. a logic error

More Related Content

Similar to Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf

SBI IT (Systems) Assistant Manager Question Paper
SBI IT (Systems) Assistant Manager Question PaperSBI IT (Systems) Assistant Manager Question Paper
SBI IT (Systems) Assistant Manager Question PaperHarish Rawat
 
Mcq+questions+cxc+it
Mcq+questions+cxc+itMcq+questions+cxc+it
Mcq+questions+cxc+itjimkana13
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxNEHARAJPUT239591
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJmeharikiros2
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docMayurWagh46
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...bhargavi804095
 
Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)Rohit Singh
 
Tổng hợp câu hỏi ôn tập android có đáp án
Tổng hợp câu hỏi ôn tập android có đáp ánTổng hợp câu hỏi ôn tập android có đáp án
Tổng hợp câu hỏi ôn tập android có đáp ánbsb_2209
 
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...bhargavi804095
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)Ankit Dubey
 

Similar to Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf (20)

C sharp chap1
C sharp chap1C sharp chap1
C sharp chap1
 
SBI IT (Systems) Assistant Manager Question Paper
SBI IT (Systems) Assistant Manager Question PaperSBI IT (Systems) Assistant Manager Question Paper
SBI IT (Systems) Assistant Manager Question Paper
 
Mock test rad 2
Mock test rad 2Mock test rad 2
Mock test rad 2
 
Mcq+questions+cxc+it
Mcq+questions+cxc+itMcq+questions+cxc+it
Mcq+questions+cxc+it
 
Bit%20 ch02
Bit%20 ch02Bit%20 ch02
Bit%20 ch02
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptx
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).doc
 
Srgoc dotnet_new
Srgoc dotnet_newSrgoc dotnet_new
Srgoc dotnet_new
 
C vs JAVA.pptx
C vs JAVA.pptxC vs JAVA.pptx
C vs JAVA.pptx
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...
 
chapter 1.pptx
chapter 1.pptxchapter 1.pptx
chapter 1.pptx
 
Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)
 
Tổng hợp câu hỏi ôn tập android có đáp án
Tổng hợp câu hỏi ôn tập android có đáp ánTổng hợp câu hỏi ôn tập android có đáp án
Tổng hợp câu hỏi ôn tập android có đáp án
 
java vs C#
java vs C#java vs C#
java vs C#
 
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
ASSIGNMENT
ASSIGNMENTASSIGNMENT
ASSIGNMENT
 
Programming with c#
Programming with c#Programming with c#
Programming with c#
 
Programming in c#
Programming in c#Programming in c#
Programming in c#
 

More from akknit

Case study- A number of people- including children- became ill several.pdf
Case study- A number of people- including children- became ill several.pdfCase study- A number of people- including children- became ill several.pdf
Case study- A number of people- including children- became ill several.pdfakknit
 
Case Study- Amanda Tremblay at Citrine Software Solutions (HBS) A- Ide.pdf
Case Study- Amanda Tremblay at Citrine Software Solutions (HBS) A- Ide.pdfCase Study- Amanda Tremblay at Citrine Software Solutions (HBS) A- Ide.pdf
Case Study- Amanda Tremblay at Citrine Software Solutions (HBS) A- Ide.pdfakknit
 
CASE STUDY The graduate admissions process at begins with an applicant.pdf
CASE STUDY The graduate admissions process at begins with an applicant.pdfCASE STUDY The graduate admissions process at begins with an applicant.pdf
CASE STUDY The graduate admissions process at begins with an applicant.pdfakknit
 
Case study Read the following case study and write your report about t.pdf
Case study Read the following case study and write your report about t.pdfCase study Read the following case study and write your report about t.pdf
Case study Read the following case study and write your report about t.pdfakknit
 
Case Study 2 mon the falt and identified as high risk for falls due to.pdf
Case Study 2 mon the falt and identified as high risk for falls due to.pdfCase Study 2 mon the falt and identified as high risk for falls due to.pdf
Case Study 2 mon the falt and identified as high risk for falls due to.pdfakknit
 
CASE STUDY -70- A 27-year-old black male construction worker suddenly.pdf
CASE STUDY -70- A 27-year-old black male construction worker suddenly.pdfCASE STUDY -70- A 27-year-old black male construction worker suddenly.pdf
CASE STUDY -70- A 27-year-old black male construction worker suddenly.pdfakknit
 
Carlos Cantu- a food scientist at the International Kitchens Corporati.pdf
Carlos Cantu- a food scientist at the International Kitchens Corporati.pdfCarlos Cantu- a food scientist at the International Kitchens Corporati.pdf
Carlos Cantu- a food scientist at the International Kitchens Corporati.pdfakknit
 
CASE 6-6 Bill DeBurger- ln-Charge AccountantBuestions- inientory tieno.pdf
CASE 6-6 Bill DeBurger- ln-Charge AccountantBuestions- inientory tieno.pdfCASE 6-6 Bill DeBurger- ln-Charge AccountantBuestions- inientory tieno.pdf
CASE 6-6 Bill DeBurger- ln-Charge AccountantBuestions- inientory tieno.pdfakknit
 
Carmen Communications reported the following figures from its adjusted.pdf
Carmen Communications reported the following figures from its adjusted.pdfCarmen Communications reported the following figures from its adjusted.pdf
Carmen Communications reported the following figures from its adjusted.pdfakknit
 
Carrboro has three equal-sized groups of people- (1) Type A people con.pdf
Carrboro has three equal-sized groups of people- (1) Type A people con.pdfCarrboro has three equal-sized groups of people- (1) Type A people con.pdf
Carrboro has three equal-sized groups of people- (1) Type A people con.pdfakknit
 
Chemolithotrophs use the same chemical for their PED- energy source an.pdf
Chemolithotrophs use the same chemical for their PED- energy source an.pdfChemolithotrophs use the same chemical for their PED- energy source an.pdf
Chemolithotrophs use the same chemical for their PED- energy source an.pdfakknit
 
Check Your Recall Question 7-5 Homework - Answered - Due Mar 2nd- 12-0.pdf
Check Your Recall Question 7-5 Homework - Answered - Due Mar 2nd- 12-0.pdfCheck Your Recall Question 7-5 Homework - Answered - Due Mar 2nd- 12-0.pdf
Check Your Recall Question 7-5 Homework - Answered - Due Mar 2nd- 12-0.pdfakknit
 
Check the countries whose economies are best described as -mixed-- com (1).pdf
Check the countries whose economies are best described as -mixed-- com (1).pdfCheck the countries whose economies are best described as -mixed-- com (1).pdf
Check the countries whose economies are best described as -mixed-- com (1).pdfakknit
 
check both answers please During DNA synthesis- the lagging strand is.pdf
check both answers please During DNA synthesis- the lagging strand is.pdfcheck both answers please During DNA synthesis- the lagging strand is.pdf
check both answers please During DNA synthesis- the lagging strand is.pdfakknit
 
Characteristics of nonculture techniques include (Select all that appl.pdf
Characteristics of nonculture techniques include (Select all that appl.pdfCharacteristics of nonculture techniques include (Select all that appl.pdf
Characteristics of nonculture techniques include (Select all that appl.pdfakknit
 
Chapter Review Questions 2- A person who is supine is motinucicated- a.pdf
Chapter Review Questions 2- A person who is supine is motinucicated- a.pdfChapter Review Questions 2- A person who is supine is motinucicated- a.pdf
Chapter Review Questions 2- A person who is supine is motinucicated- a.pdfakknit
 
Chapter 7- Closing Case- Boeing and Airbus Are in a Dogfight over Ille.pdf
Chapter 7- Closing Case- Boeing and Airbus Are in a Dogfight over Ille.pdfChapter 7- Closing Case- Boeing and Airbus Are in a Dogfight over Ille.pdf
Chapter 7- Closing Case- Boeing and Airbus Are in a Dogfight over Ille.pdfakknit
 
CASE FILE Gas Gangrene A 77-year-old male resident of southern Colorad.pdf
CASE FILE Gas Gangrene A 77-year-old male resident of southern Colorad.pdfCASE FILE Gas Gangrene A 77-year-old male resident of southern Colorad.pdf
CASE FILE Gas Gangrene A 77-year-old male resident of southern Colorad.pdfakknit
 
Case Studies- Case 1- A sexually active college student went to her OB.pdf
Case Studies- Case 1- A sexually active college student went to her OB.pdfCase Studies- Case 1- A sexually active college student went to her OB.pdf
Case Studies- Case 1- A sexually active college student went to her OB.pdfakknit
 
Case History- Tracking a -Patchwork Quilt- Pathogen Nine-month-old Eva.pdf
Case History- Tracking a -Patchwork Quilt- Pathogen Nine-month-old Eva.pdfCase History- Tracking a -Patchwork Quilt- Pathogen Nine-month-old Eva.pdf
Case History- Tracking a -Patchwork Quilt- Pathogen Nine-month-old Eva.pdfakknit
 

More from akknit (20)

Case study- A number of people- including children- became ill several.pdf
Case study- A number of people- including children- became ill several.pdfCase study- A number of people- including children- became ill several.pdf
Case study- A number of people- including children- became ill several.pdf
 
Case Study- Amanda Tremblay at Citrine Software Solutions (HBS) A- Ide.pdf
Case Study- Amanda Tremblay at Citrine Software Solutions (HBS) A- Ide.pdfCase Study- Amanda Tremblay at Citrine Software Solutions (HBS) A- Ide.pdf
Case Study- Amanda Tremblay at Citrine Software Solutions (HBS) A- Ide.pdf
 
CASE STUDY The graduate admissions process at begins with an applicant.pdf
CASE STUDY The graduate admissions process at begins with an applicant.pdfCASE STUDY The graduate admissions process at begins with an applicant.pdf
CASE STUDY The graduate admissions process at begins with an applicant.pdf
 
Case study Read the following case study and write your report about t.pdf
Case study Read the following case study and write your report about t.pdfCase study Read the following case study and write your report about t.pdf
Case study Read the following case study and write your report about t.pdf
 
Case Study 2 mon the falt and identified as high risk for falls due to.pdf
Case Study 2 mon the falt and identified as high risk for falls due to.pdfCase Study 2 mon the falt and identified as high risk for falls due to.pdf
Case Study 2 mon the falt and identified as high risk for falls due to.pdf
 
CASE STUDY -70- A 27-year-old black male construction worker suddenly.pdf
CASE STUDY -70- A 27-year-old black male construction worker suddenly.pdfCASE STUDY -70- A 27-year-old black male construction worker suddenly.pdf
CASE STUDY -70- A 27-year-old black male construction worker suddenly.pdf
 
Carlos Cantu- a food scientist at the International Kitchens Corporati.pdf
Carlos Cantu- a food scientist at the International Kitchens Corporati.pdfCarlos Cantu- a food scientist at the International Kitchens Corporati.pdf
Carlos Cantu- a food scientist at the International Kitchens Corporati.pdf
 
CASE 6-6 Bill DeBurger- ln-Charge AccountantBuestions- inientory tieno.pdf
CASE 6-6 Bill DeBurger- ln-Charge AccountantBuestions- inientory tieno.pdfCASE 6-6 Bill DeBurger- ln-Charge AccountantBuestions- inientory tieno.pdf
CASE 6-6 Bill DeBurger- ln-Charge AccountantBuestions- inientory tieno.pdf
 
Carmen Communications reported the following figures from its adjusted.pdf
Carmen Communications reported the following figures from its adjusted.pdfCarmen Communications reported the following figures from its adjusted.pdf
Carmen Communications reported the following figures from its adjusted.pdf
 
Carrboro has three equal-sized groups of people- (1) Type A people con.pdf
Carrboro has three equal-sized groups of people- (1) Type A people con.pdfCarrboro has three equal-sized groups of people- (1) Type A people con.pdf
Carrboro has three equal-sized groups of people- (1) Type A people con.pdf
 
Chemolithotrophs use the same chemical for their PED- energy source an.pdf
Chemolithotrophs use the same chemical for their PED- energy source an.pdfChemolithotrophs use the same chemical for their PED- energy source an.pdf
Chemolithotrophs use the same chemical for their PED- energy source an.pdf
 
Check Your Recall Question 7-5 Homework - Answered - Due Mar 2nd- 12-0.pdf
Check Your Recall Question 7-5 Homework - Answered - Due Mar 2nd- 12-0.pdfCheck Your Recall Question 7-5 Homework - Answered - Due Mar 2nd- 12-0.pdf
Check Your Recall Question 7-5 Homework - Answered - Due Mar 2nd- 12-0.pdf
 
Check the countries whose economies are best described as -mixed-- com (1).pdf
Check the countries whose economies are best described as -mixed-- com (1).pdfCheck the countries whose economies are best described as -mixed-- com (1).pdf
Check the countries whose economies are best described as -mixed-- com (1).pdf
 
check both answers please During DNA synthesis- the lagging strand is.pdf
check both answers please During DNA synthesis- the lagging strand is.pdfcheck both answers please During DNA synthesis- the lagging strand is.pdf
check both answers please During DNA synthesis- the lagging strand is.pdf
 
Characteristics of nonculture techniques include (Select all that appl.pdf
Characteristics of nonculture techniques include (Select all that appl.pdfCharacteristics of nonculture techniques include (Select all that appl.pdf
Characteristics of nonculture techniques include (Select all that appl.pdf
 
Chapter Review Questions 2- A person who is supine is motinucicated- a.pdf
Chapter Review Questions 2- A person who is supine is motinucicated- a.pdfChapter Review Questions 2- A person who is supine is motinucicated- a.pdf
Chapter Review Questions 2- A person who is supine is motinucicated- a.pdf
 
Chapter 7- Closing Case- Boeing and Airbus Are in a Dogfight over Ille.pdf
Chapter 7- Closing Case- Boeing and Airbus Are in a Dogfight over Ille.pdfChapter 7- Closing Case- Boeing and Airbus Are in a Dogfight over Ille.pdf
Chapter 7- Closing Case- Boeing and Airbus Are in a Dogfight over Ille.pdf
 
CASE FILE Gas Gangrene A 77-year-old male resident of southern Colorad.pdf
CASE FILE Gas Gangrene A 77-year-old male resident of southern Colorad.pdfCASE FILE Gas Gangrene A 77-year-old male resident of southern Colorad.pdf
CASE FILE Gas Gangrene A 77-year-old male resident of southern Colorad.pdf
 
Case Studies- Case 1- A sexually active college student went to her OB.pdf
Case Studies- Case 1- A sexually active college student went to her OB.pdfCase Studies- Case 1- A sexually active college student went to her OB.pdf
Case Studies- Case 1- A sexually active college student went to her OB.pdf
 
Case History- Tracking a -Patchwork Quilt- Pathogen Nine-month-old Eva.pdf
Case History- Tracking a -Patchwork Quilt- Pathogen Nine-month-old Eva.pdfCase History- Tracking a -Patchwork Quilt- Pathogen Nine-month-old Eva.pdf
Case History- Tracking a -Patchwork Quilt- Pathogen Nine-month-old Eva.pdf
 

Recently uploaded

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf

  • 1. Chapter 1 Introduction to Computers, Programs, and Java 1. A Java program with more than one class will run. a. True b. False 2. A Java program can have more than one class but all the classes must be public. a. True b. False 3. Considering the program code below. What possible class or classes will be created when the program is compiled? a. class A only b. classes A and C c. classes A , B and C d. There will be a compilation error because class C is declared public 4. the following words to the best appropriate description. Words: a) Dial-up Modem b) DSL c) Cable Modem d) NIC e) LAN stands for Network Interface Card, which is a device that connects the computer to the Internet. stands for Local Area Network, which connects computers within a limited area such as a school, a home, or an office. uses a phone line to dial a phone number to connect to the Internet. stands for Digital Subscriber Line that directly connects a computer to the Internet through a phone without having to dial up a number. uses a cable TV line to connect to the Internet. 5. Which of these components interconnects computer subsystems? a. Bus b. Keyboard c. Data d. Network Cable 6. Identify the items that are intangible parts of the computer system. a. Motherboard b. Disk c. Operating system d. Application program 7. The unit that coordinates the actions of other units of the computer is a. Control unit b. Arithmetic unit c. Logic unit d. Peripheral unit 8. is the brain of a computer. a. Hardware b. CPU c. Memory d. Disk 9. The intermediate code from JVM is called a. Byte code b. Bit code c. Machine code d. Assembly code 10. Java use the following translator in executing translating its source code to object code. a. Compiler and Interpreter b. Compiler only c. Interpreter only d. Assembler only 11. Match the following words to its best description Word: a) Machine Language b) Assembly Language c) High-Level Language d) Source Code e) Interpreter f) Assembler g) Compiler is English-like, easy to learn and use. uses short descriptive word to represent each of the machine- language instructions. is computer's native language. translates the entire source code into a machine-code file. processes one statement at a time, translates it to the machine code, and executes it. is a program written in a high-level programming language. is a program that translates assembly-language code into machine code. 12. The speed of the CPU may be measured in a. megabytes b. gigabytes c. megahertz d. gigahertz 13. Why do computers use zeros and ones? a. because combinations of zeros and ones can represent any numbers and characters. b. because digital devices have two stable states and it is natural to use one state for 0 and the other for 1 . c. because binary numbers are simplest. d. because binary numbers are the bases upon which all other number 14. Two byte has bits. a. 4 b. 8 c. 12 d. 16 15. One gigabyte is approximately bytes. a. 1 million b. 10 million c. 1 billion d. 1 trillion 16. A program and its data must be moved into the computer's before they can be executed by the CPU. a. memory b. hard disk c. CP U d. CD-ROM 17. A computer's is volatile; that is, any information stored in it is lost when the system's power is turned off. a. Memory b. hard disk c. flash stick d. CD-ROM 18. Which of the following are storage devices? a. portable disk b. hard disk c. flash stick d. CD- ROM 19. The specifies the number of pixels in horizontal and vertical dimensions of the display device. a. screen resolution b. pixel c. dot pitch d. monitor 20. is a device to connect a computer to a local area network (LAN). a. Regular modem b. DSL c. Cable modem d. NIC 21. are instructions to the computer. a. Hardware b. Software c. Programs d. Keyboards 22. Computer can execute the code in a. machine language b. assembly language c. high-level language d. none of the above 23. translates high-level language program into machine language program. a. An assembler b. A compiler c. CP U 23. is an operating system. a. Java b. C + + c. Windows d. Visual Basic e. Ada 24. is a program that runs on a computer to manage and control a computer's activities. a. Operating system b. Java c. Modem d. Interpreter e. Compiler 25. Due to security reasons, Java cannot run from a Web browser in the new version of Java. a. Applications b.
  • 2. Applets c. Servlets d. Micro Edition programs 26. is not an object-oriented programming language. a. Java b. C + + c. C d. CH e. Python 27. is interpreted. a. Java b. C + + c. C d. Ada e. Pascal 28. is architecture-neutral. a. Java b. C + + c. C d. Ada e. Pascal 29. is a technical definition of the language that includes the syntax and semantics of the Java programming. a. Java language specification b. Java API c. Java JDK d. Java IDE 30. contains predefined classes and interfaces for developing Java programs. a. dava language specification b. Java A P 1 c. Java JDK d. Java IDE 31. consists of a set of separate programs for developing and testing Java programs, each of which is invoked from a command line. a. Java language specification b. Java A P I c. Java JDK d. Java IDE 32. _provides an integrated development environment (IDE) for rapidly developing Java programs. a. Java language specification b. Java API c. Java JDK d. Java IDE 33. The main method header is written as: 3. public static void main(string[] args) b. public static void Main(String[] args) c. public static void main(String[] args) d. public static main(String[] args) e. public void main(String[] args) 34. Which of the following statements is correct? a. Every line in a program must end with a semicolon. b. Every statement in a program must end with a semicolon. c. Every comment line must end with a semicolon. d. Every method must end with a semicolon. e. Every class must end with a semicolon. 35. Which of the following statements is correct to display Welcome to Java on the console? a. System.out.println("Welcome to Java"); b. System.out.println("Welcome to Java"); c. System.println("Welcome to Java"): d. System.out.println("Welcome to Java"'); e. System.out.println("Welcome to ava"); 36. The JDK command to just compile a class (not run) in the file Test.java is a. java Test b. java Test.java c. javac Test.java d. javac Test e. JAVAC Test.java 37. Which JDK command is correct to run a Java application in ByteCode.class? a. java ByteCode b. java ByteCode.class c. javac ByteCode.java d. javac ByteCode e. JAVAC ByteCode 38. Java compiler translates Java source code into a. Java bytecode b. machine code c. assembly code d. another high-level language code 39. is a software that interprets Java bytecode. a. Java virtual machine b. Java compiler c. Java debugger d. Java API 40. Suppose you define a Java class as follows, the source code should be stored in a file named public class Test { } a. Test.class b. Test.doc c. Test.txt d. Test.java e. Any name with extension .java 41. The extension name of a Java bytecode file is a. java b. .obj c. class d. exe 42. The extension name of a Java source code file is a. .java b. .obj c. class d. exe 43. Which of the following lines is not a Java comment? a. / comments / b. // comments c. - comments d. / / comments / e. ** comments 44. Which of the following are the reserved words? a. Public b. Static c. Void d. class 45. Every statement in Java ends with a. a semicolon (i) b. a comma (,) c. a period (.) d. an asterisk ( ) 46. A block is enclosed inside a. Parentheses b. Braces c. Brackets d. Quotes 47. Programming style is important, because a. a program may not compile if it has a bad style b. good programming style can make a program run faster c. good programming style makes a program more readable d. good programming style helps reduce programming errors 48. Analyze the following code. I: public class Test { public static void main(String[] args) { System.out.println("Welcome to Java!"); } } II: public class Test { public static void main(String[] args) { System.out.printIn("Welcome to Java!"); }} a. Both I and II can compile and run and display Welcome to Java, but the code in II has a better style than I. b. Only the code in I can compile and run and display Welcome to Java. c. Only the code in II can compile and run and display Welcome to Java. d. Both I and II can compile and run and display Welcome to Java, but the code in I has a better style than II. Key:d Both I and II are the same except the format is different. Format is a readability issue only. 49. Which of the following code has the best style? I: public class Test { public static void main(String[] args) { System.out.println("Welcome to
  • 3. Java!"); } } II: public class Test { public static void main(String[] args) { System.out.println("Welcome to Java!"); } } III: public class Test { public static void main(String[] args) { System.out.println("Welcome to Java!"); } } IV: public class Test { public static void main(String[] args) { System.out.println("Welcome to Java!"); } } a. 1 b. II c. III d. IV 50. If a program compiles fine, but it produces incorrect result, then the program suffers a. a compile error b. a runtime error c. a logic error 51. If you forget to put a closing quotation mark on a string, what kind of error will be raised? a. a compile error b. a runtime error c. a logic error