- A variable marked with the boolean data type…can have a value of either true or false.…I'll demonstrate this in the booleans project.…Within the main method, I'll declare two variables,…and I'll start with the keyword boolean, all lower case.…That means this is a primitive variable, not an object.…I'll name the variable b1,…and I'll assign it a value of true.…Then, I'll create another boolean variable,…and I'll say that one is false.…Now, I'm going to shrink down my project window…to eliminate some flickering that's happening,…then I'll add some output to the console.…
I'll start with a string of "The value of b1 is"…and then I'll append the value b1.…I'll duplicate that line of code,…and change both the label and the value,…and then I'll run the class.…And I get the expected output.…The values of the primitive variables, b1 and b2,…have been translated to equivalent strengths.…So, true gets a string of true,…and false gets a string of false.…All primitive variables, as I've mentioned previously,…can have default values.…
Author
Updated
9/30/2020Released
7/24/2015- Understanding the history and principles of Java
- Installing Java, IntelliJ IDEA, and BlueJ
- Creating a Java project
- Working with variables, values, and expressions
- Working with object data types
- Building, comparing, and parsing strings
- Debugging and exception handling
- Creating loops and reusable code
- Passing arguments by reference or value
- Using simple and complex arrays
- Creating custom classes
- Understanding inheritance and polymorphism
- Managing files with Java libraries
- Documenting code with Javadoc
- Packaging classes in JAR files
Skill Level Beginner
Duration
Views
Related Courses
-
Java Essential Training for Students
with Peggy Fisher3h 6m Intermediate
-
Introduction
-
Welcome59s
-
Is this course for you?3m 22s
-
Using the exercise files5m 5s
-
-
1. What Is Java?
-
The history of Java5m 57s
-
Java syntax and compilation5m 26s
-
-
2. Installing the Software
-
Installing Java on Windows3m 49s
-
Installing Java on OS X2m 50s
-
Installing BlueJ1m 52s
-
-
3. Getting Started
-
Hello World5m 44s
-
-
4. Working with Variables
-
Converting numeric values5m 37s
-
Using Java operators6m 11s
-
5. Working with Objects
-
Using the String class5m 5s
-
Comparing string values5m 51s
-
Parsing string values3m 13s
-
Working with dates and times8m 35s
-
6. Exception Handling and Debugging
-
Debugging with IntelliJ IDEA5m 18s
-
Throwing custom exceptions3m 19s
-
7. Managing Program Flow
-
Using the switch statement4m 51s
-
Creating looping code blocks5m 23s
-
8. Using Data Collections
-
Using simple arrays6m 32s
-
Using two-dimensional arrays4m 17s
-
-
9. Creating Custom Classes
-
Understanding encapsulation7m 19s
-
Using constructor methods4m 56s
-
-
10. Working with Inheritance
-
11. Using Common Java Libraries
-
12. Preparing a Java Application for Deployment
-
Conclusion
-
Next steps1m 37s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Working with Boolean values and expressions