In this video, Doug Winnie explains how to create a custom class. He also reviews what a class package is, and how to create a constructor and class members in Java.
- [Host] While there are pre-built classes…all throughout Java, you can create your own…by defining the blueprint of a class…and then instantiate it in your program.…To create a class you need to create a new java file.…To do this, expand the project folder,…and then open the source folder or SRC.…In there is a folder called com dot company.…This is called the package.…When you create a class it exists in a package.…You can think of packages like a group of folders.…There's a top group called com…and then a second called company.…
You can define these to be whatever you want.…The com dot company package is created by default…when you create a new project in IntelliJ.…On that folder right click and select new,…then select Java Class.…Then you'll see the create new class window appear.…You need to enter the name of the class.…Let's create a class for a cat,…so enter cat with a capital letter.…Classes usually start with a capital letter.…Then click okay.…
When you create the new class you'll see an empty class file…
- 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
Computer Science Principles: The Internetwith Doug Winnie59m 30s Beginner
Java Essential Training for Studentswith Peggy Fisher3h 6m Intermediate
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?
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.