• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 46 pages
Exam (elaborations)

Introduction to Java Programming and Data Structures 12th Edition by Y. Daniel Liang | Comprehensive Complete Test Bank | 2026/2027 Study Resource

Document preview thumbnail
Preview 4 out of 46 pages

Introduction to Java Programming and Data Structures 12th Edition by Y. Daniel Liang | Comprehensive Complete Test Bank | 2026/2027 Study Resource Description: This revision set covers Java fundamentals, object-oriented programming, data structures, algorithms, and advanced Java topics aligned with the 12th Edition of Y. Daniel Liang's textbook. It is designed for exam preparation, self testing, and comprehensive revision for the 2026/2027 academic year. Keywords: Java, Y. Daniel Liang, 12th Edition, Test Bank, MCQs, Revision, Data Structures, OOP, Algorithms, 2026, 2027. Chapter 1: Introduction to Computers, Programs, and Java 1. What is the correct extension of a Java source file? A) .class B) .java C) .exe D) .jar 2. Which of the following is NOT a Java keyword? A) class B) public C) main D) static 3. What does JVM stand for? A) Java Virtual Machine B) Java Variable Method C) Java Visual Model D) Just Virtual Machine 4. Which command compiles a Java program? A) java B) javac C) javadoc D) jdb 5. What is the correct signature of the main method? A) public void main(String args) B) public static void main(String[] args) C) static void main(String args) D) public main(String[] args) Chapter 2: Elementary Programming 6. Which data type is used to store a single character? A) String B) char C) int D) boolean 7. What is the size of an int in Java? A) 2 bytes B) 4 bytes C) 8 bytes D) Depends on OS 8. Which of the following is a valid identifier? A) 1variable B) _variable C) variable-1 D) class 9. What is the result of 5 / 2 in Java (integer division)? A) 2.5 B) 2 C) 3 D) 2.0 10. Which operator is used for modulus?

Content preview

Introduction to Java Programming and
Data Structures 12th Edition by Y. Daniel
Liang | Comprehensive Complete Test
Bank | 2026/2027 Study Resource
Description: This revision set covers Java fundamentals, object-oriented
programming, data structures, algorithms, and advanced Java topics aligned with
the 12th Edition of Y. Daniel Liang's textbook. It is designed for exam preparation, self-
testing, and comprehensive revision for the 2026/2027 academic year.

Keywords: Java, Y. Daniel Liang, 12th Edition, Test Bank, MCQs, Revision, Data
Structures, OOP, Algorithms, 2026, 2027.




Chapter 1: Introduction to Computers, Programs, and Java

1. What is the correct extension of a Java source file?
A) .class
B) .java ✅
C) .exe
D) .jar

2. Which of the following is NOT a Java keyword?
A) class
B) public

,C) main ✅
D) static

3. What does JVM stand for?
A) Java Virtual Machine ✅
B) Java Variable Method
C) Java Visual Model
D) Just Virtual Machine

4. Which command compiles a Java program?
A) java
B) javac ✅
C) javadoc
D) jdb

5. What is the correct signature of the main method?
A) public void main(String args)
B) public static void main(String[] args) ✅
C) static void main(String args)
D) public main(String[] args)




Chapter 2: Elementary Programming

6. Which data type is used to store a single character?
A) String
B) char ✅
C) int
D) boolean

,7. What is the size of an int in Java?
A) 2 bytes
B) 4 bytes ✅
C) 8 bytes
D) Depends on OS

8. Which of the following is a valid identifier?
A) 1variable
B) _variable ✅
C) variable-1
D) class

9. What is the result of in Java (integer division)?
A) 2.5
B) 2 ✅
C) 3
D) 2.0

10. Which operator is used for modulus?
A) /
B) %
C) *
D) // ✅




Chapter 3: Selections

11. Which statement is used for decision making?
A) for
B) while

, C) if ✅
D) do-while

12. What is the output of: if (true) System.out.println("A"); else
System.out.println("B");
A) A ✅
B) B
C) AB
D) Compilation error

13. Which of these is a logical operator?
A) &
B) &&
C) |
D) ^ ✅

14. What does the ternary operator look like?
A) condition ? value1 : value2 ✅
B) condition : value1 ? value2
C) condition ? value1, value2
D) condition -> value1 : value2

15. Which switch statement is valid?
A) switch (x) { case 1: ... }
B) switch (x) { case "1": ... }
C) switch (x) { case 1.0: ... }
D) switch (x) { case true: ... } ✅




Chapter 4: Mathematical Functions, Characters, and Strings

Document information

Uploaded on
September 17, 2026
Number of pages
46
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
7
Followers
0
Items
957
Last sold
2 weeks ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions