Skylight home

O Be Prepared home page
O What teachers say...
O Purchase online
O Order form


Be Prepared
for the AP Computer Science Exam
in Java

Eighth Edition


Maria Litvin
Phillips Academy, Andover, Massachusetts

Gary Litvin
Skylight Publishing

Includes six practice exams

Copyright © 2022 by Skylight Publishing.

ISBN 978-0-9972528-7-3.  List price: $23.95.  12+ copies: $18.95 each.

352 pages. Dimensions 8.25" x 10.75" x 0.75". Soft cover.

e-Book: $23.95 (lifetime).

250 Multiple-Choice
Computer Science Questions
in Java



Maria Litvin
Phillips Academy, Andover, Massachusetts

Gary Litvin
Skylight Software, Inc.

    Part# 978-0-9727055-J-E.  Copyright © 2008-2012 by Skylight Publishing.

    This downloadable e-edition includes MS Word files and a PDF file with questions and a PDF file with answers and solutions.  It is licensed for use in one school.  $85.00 per school.

Brief Contents

How to Use This Book
Chapter 1. Exam Format, Grading, and Tips
Chapter 2. Java Features, Part 1
Chapter 3. Java Features, Part 2
Chapter 4. Program Design and OOP Concepts
Chapter 5. Algorithms
Chapter 6. Annotated Solutions to Past Free-Response Questions
Practice Exams (#1, #2, #3, #4, #5, #6)
Answers and Solutions

On the Back Cover

Since it was first published in 1999, Be Prepared for the AP CS Exam has helped tens of thousands of students earn high scores on the AP CS exams. Whether you sit in the front row, the back row, or anywhere in between, this book will help you focus on the AP exam requirements, review the material, and fill the gaps in your knowledge.

“Excellent review book that can help you get your 5 too! ...I give my highest recommendation for this outstanding review book.” Reviewer from IL, USA

“I Got My 5. ...this book was perfect for bringing me up to speed for what was on the test.” Reviewer from Lafayette, CA, USA

“By far the best APCS review book. ...those of my students who used this book did the best on the exam.” Reviewer from Houston, TX

“This Book Is God-Sent... I have absolutely no idea what I would have done without this book. ...I cannot say enough how helpful this book was.” Reviewer from Los Angeles, CA, USA

“A stunning APCS review book. ...I'm delighted to have copies to use with my students. Highly recommended!” Reviewer from Kent, WA

“Your students will build confidence for the AP Computer Science Exam with this review and practice resource. ...The hints for exam-taking are extremely helpful and will benefit the student as well as the teacher new to the AP CS curriculum. And, yes, we 'seasoned' teachers also benefit from reviewing this chapter! The remaining chapters include superb reviews of the topics covered on the exams.” Reviewer for

See full reviews and testimonials at,

About This Book

This book offers Continental Mathematics League computer science contest questions from 1999 to 2008.  CML has been bringing us fun competitions in mathematics and computer science for many years.  The annual CML contest in computer science takes place every spring, shortly before the Advanced Placement exams.  It offers 25 challenging multiple-choice questions for 40 minutes.  The questions mostly stay within the range of the standard AP CS curriculum, but many of them add an unusual twist or turn, and it is very difficult to answer all of them correctly within the allotted time.  With the time limit removed, however, these questions offer a great opportunity to test your knowledge of the subject, fill in gaps, gain new insights, and get "heavy-duty" practice for the AP exam.

2001, Question 14:

In the ABBAB language the alphabet has only two letters. A string of letters (including one-letter strings) is a valid word, if and only if the isValid method returns true for that string. isValid is defined as follows:

    public boolean isValid (String word) { int n = word.length(); return n <= 1 || (isValid(word.substring(0, n-1)) && word.charAt(n-1) == 'B') || (isValid(word.substring(0, n-2)) && "BA".equals(word.substring(n-2))); }

How many valid words of length 7 are there in the ABBAB language?

(A)     2
(B)     3
(C)     15
(D)     23
(E)     34

Skylight Publishing