In this video, Doug Winnie explains what a class is in Java. Classes are the blueprints that are used for constructing objects. Every object is an instance of a class and contains all of the capabilities that are defined in the class.
- [Narrator] All objects are defined by classes.…Classes are the blueprints that…define what an object can do,…what it can store and how it functions.…For instance, let's create an instance…of the string class.…Let's write this in long form…to make it clear what is going on.…We're going to create a variable that's going to be…a type of string called myString.…We're going to set that equal to a new string…with a value of Doug.…In this example we are creating a new object…based on the string class.…
So the program looks at the blueprint for the class…and constructs an object based on how the class is designed.…When we type new string after the assignment operator,…the string with a parentheses…looks like a method, doesn't it?…Well, that's because it is.…It's a special method called a constructor.…When we tell a program to create or construct…an object based on a class blueprint…it executes the instructor.…It then constructs an instance of the class,…and then takes that instance…and assigns it to the variable myString.…
- The history of Java
- Setting up your development environment
- Working with values and variables
- Using methods and functions
- Capturing user input
- Creating conditional tests
- Using loops
- Creating and changing arrays
- Object-oriented programming in Java
- Defining permissions
- Extending classes
Skill Level Beginner
Java Essential Training for Studentswith Peggy Fisher3h 6m Intermediate
Computer Science Principles: The Internetwith Doug Winnie59m 30s Beginner
1. Intro to Java
2. Define Actions Using Code
3. Repeat Actions and Test for Conditions
4. Object-Oriented Programming Basics
Next steps1m 44s
- 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.Cancel
Take 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.