In this video, Doug Winnie demonstrates how to create a method in Java and introduces some common errors you might get and how to resolve them, specifically regarding variable scope.
- [Instructor] Methods are name sections of code…that we can execute using a single statement.…In Java we create a method, also known as a function…and I use the terms interchangeably.…By defining what can access it and what its type…is in the name of the method.…We then surround the code of the method using…a pair of curly braces.…Let's write some Java code and learn…how it can use methods to call them.…Let's also walk through how to…create a new project in IntelliJ.…First launch the IDE.…From the welcome window, click create new project.…
There are multiple types of…projects we can make using IntelliJ.…We want a simple Java project.…So make sure it's selected at the top.…You then need to provide the SDK for the project.…In my case I'm using the 1.8 version of the Java JDK.…If nothing appears here, you need to add…a new SDK to IntelliJ.…To do that click the new button and select JDK.…Then navigate to the folder where the JDK was installed…that you downloaded from Oracle.…
And then you click ok.…I already have linked it so I'm going to click cancel for now.…
- 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?
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.