<< Chapter < Page Chapter >> Page >
This lesson discusses the ramifications of types short, long, byte, char, and float not being included in the Java subset for the AP Computer Science A exam.

Table of contents



This tutorial lesson is part of a series of lessons dedicated to the AP Computer Science A Exam .

The purpose of the series is to help you to better understand the Java Subset specifications for the Advanced Placement Computer Science A exam.

For example, if you access the AP Computer Science Course Description and scroll down to Appendix A titled AP Computer Science Java Subset , you will find the following specification :

1. The primitive types int, double, and boolean are part of the AP Java subset.

The other primitive types short, long, byte, char, and float are not in the subset.

In particular, students need not be aware that strings are composed of char values. Introducing char does not increase the expressiveness of the subset.

Students already need to understand string concatenation, String.substring, and String.equals. (This is a requirement in a different part of the course description .)

Not introducing char avoids complexities with the char/int conversions and confusion between "x" and 'x'.

(Note that I inserted some explanatory text in parentheses and also inserted some line breaks for clarity. Also note that this is the wordingthat appeared on the website on March 1, 2011. It may change over time.)

May be clear to some, but not to others

While some students and their homeschool parents may know exactly what is meant by this text, others may not. Therefore, my objective will be to elaborateon and attempt to clarify such specifications from a technical viewpoint to help those students and their parents get a better understanding of where they needto concentrate their efforts.

Viewing tip

I recommend that you open another copy of this document in a separate browser window and use the following links to easily find and view the figureswhile you are reading about them.

  • Figure 1 . Calculating the number of cans of paint to purchase.
  • Figure 2 . Value ranges for integer types.
  • Figure 3 . Representing a large range of values.
  • Figure 4 . Value range for floating-point types.

Supplemental material

I recommend that you also study the other lessons in my extensive collection of online programming tutorials. You will find a consolidated index at www.DickBaldwin.com .


Java, C++, C#, and some other modern programming languages make heavy use of a concept that we refer to as type, or data type. We refer to those languages as strongly typed or type-sensitive languages.

Not all languages are type-sensitive languages. In particular, some languages hide the concept of type from the programmer and automatically deal with type issues behind the scenes.

Different types of data

Type-sensitive programming languages deal explicitly with different types of data. Some data types involve whole-numbers only (no fractional parts are allowed) . We generally refer to these as integer types.

Questions & Answers

what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
Kevin Reply
a perfect square v²+2v+_
Dearan Reply
kkk nice
Abdirahman Reply
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
Kim Reply
or infinite solutions?
Embra Reply
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
Nancy Reply
rolling four fair dice and getting an even number an all four dice
ramon Reply
Kristine 2*2*2=8
Bridget Reply
Differences Between Laspeyres and Paasche Indices
Emedobi Reply
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
Mary Reply
is it 3×y ?
Joan Reply
J, combine like terms 7x-4y
Bridget Reply
im not good at math so would this help me
Rachael Reply
how did I we'll learn this
Noor Reply
f(x)= 2|x+5| find f(-6)
Prince Reply
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
what is nanomaterials​ and their applications of sensors.
Ramkumar Reply
what is nano technology
Sravani Reply
preparation of nanomaterial
Victor Reply
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
Himanshu Reply
can nanotechnology change the direction of the face of the world
Prasenjit Reply
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
Ali Reply
the Beer law works very well for dilute solutions but fails for very high concentrations. why?
bamidele Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Got questions? Join the online conversation and get instant answers!
QuizOver.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Ap computer science a, clarification of the java subset. OpenStax CNX. Oct 03, 2015 Download for free at https://legacy.cnx.org/content/col11279/1.5
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ap computer science a, clarification of the java subset' conversation and receive update notifications?