About This Chapter
Built-In Data Types for Programming- Chapter Summary
We've put together a resource you can use to study built-in data types for programming any time on your mobile device or computer. Studying is simple with our concise lessons on data types in Java, Java naming conventions and floating point numbers. These lessons are self-paced so you can work as quickly or slowly as needed. Any questions you might have can be directed to an expert via the Dashboard. Once you finish this chapter, you should be ready to:
- Differentiate between short, long and int data types
- Define char, string, and Boolean data types in Java
- Explain Java data type conversion
- Detail the difference between arithmetic operators and relational operators
- Discuss APIs in Java
- Use Java to generate a random number between 1 and 100
1. Java Naming Conventions: Variables & Constants
Sue has friends named Jane and Jayne. Are they the same friends? Probably not. Why? Because their names are spelt differently! Similarly the Java programming language has naming conventions for variables and constants. In this lesson we will learn about these conventions.
2. Java Data Types: Short, Int & Long
This lesson will provide a overview of the Java primitive Java data types: short, int, and long. These whole-number data types have a range of uses. We will provide syntax and examples of their use in programming.
3. Java: Floating Point Numbers
In Java, floating point numbers are numbers that have a decimal part to them. Java has two basic floating point data types - float and double. In this lesson, we'll learn what they are and how to use them.
4. Java: Char Data Type
Whether you pronounce it 'char' or 'care', the Java char data type has no relation to burned beef or care. It is simply short for character (as on a keyboard). This lesson will provide an overview of the char data type, and some examples of its use.
5. Java: String Data Type
In Java, strings are not chased by cats. A string is a sequence, or string, or single characters. This lesson will define the string data type, and provide some examples of its use.
6. Java: Boolean Data Type
True or False? This is a question that is asked frequently in programming languages. Java is no exception. In this lesson, we will learn about the Boolean data type (True or False) and provide some examples.
7. Java Data Type Conversion
You'll learn how to move values contained in one Java data type into a different data type, as well as the consequences of any conversion that may take place.
8. Java: Arithmetic Operators
A large chunk of programming involves math, from addition to multiplication to modulo operations. These math operations need not be confusing or overly complex. This lesson will cover the arithmetic operators in Java and provide working code examples.
9. Java: Relational Operators
Programming is all about testing and comparing values. Are they equal, or less than, or more than? The Java relational operators help us in these operations. This lesson will explain the operators and provide syntax examples.
10. APIs in Java
Java provides a wide array of tools in your programs to perform many tasks, such as reading files or taking input from the keyboard. These tools are collectively called the Java APIs. This lesson will provide an overview and code examples of APIs in action.
11. Java: Generate Random Number Between 1 & 100
Random numbers are important in programming, especially in gaming. This lesson will describe how to generate a random number between 1 and 100. We will also discuss the concept of randomness.
Earning College Credit
Did you know… We have over 160 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.
To learn more, visit our Earning Credit Page
Transferring credit to the school of your choice
Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.
Other chapters within the Computer Science 109: Introduction to Programming course
- Computer Programming Basics
- Conditionals & Loops in Programming
- Arrays in Programming
- Input & Output in Programming
- Functions & Modules in Programming
- Object-Oriented Programming Overview
- Algorithmic Analysis, Sorting & Searching
- Stacks & Queues for Data Structures
- Tables, Maps & Graphs in Programming